@@ -208,8 +208,13 @@ function sendBidRequestToGa(bid) {
208
208
_analyticsQueue . push ( function ( ) {
209
209
_eventCount ++ ;
210
210
if ( _sendFloors ) {
211
- var floor = ( bid . floorMin ) ? bid . floorMin : 'No Floor' ;
212
- window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Requests by Floor=' + floor , 'Ad Unit=' + bid . adUnitCode + ',' + bid . bidderCode , 1 , _disableInteraction ) ;
211
+ var floor = 'No Floor' ;
212
+ if ( bid . floorData ) {
213
+ floor = bid . floorData . floorValue ;
214
+ } else if ( bid . bids . length ) {
215
+ floor = bid . bids [ 0 ] . getFloor ( ) . floor ;
216
+ }
217
+ window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Requests by Floor=' + floor , bid . bidderCode , 1 , _disableInteraction ) ;
213
218
} else {
214
219
window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Requests' , bid . bidderCode , 1 , _disableInteraction ) ;
215
220
}
@@ -239,8 +244,8 @@ function sendBidResponseToGa(bid) {
239
244
window [ _gaGlobal ] ( _trackerSend , 'event' , 'Prebid.js CPM Distribution' , cpmDis , bidder , 1 , _disableInteraction ) ;
240
245
}
241
246
if ( _sendFloors ) {
242
- var floor = ( bid . floorMin ) ? bid . floorMin : 'No Floor' ;
243
- window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Bids by Floor=' + floor , 'Ad Unit =' + bid . adUnitCode + ',' + bidder , cpmCents , _disableInteraction ) ;
247
+ var floor = ( bid . floorData ) ? bid . floorData . floorValue : 'No Floor' ;
248
+ window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Bids by Floor=' + floor , 'Size =' + bid . size + ',' + bidder , cpmCents , _disableInteraction ) ;
244
249
} else {
245
250
window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Bids' , bidder , cpmCents , _disableInteraction ) ;
246
251
}
@@ -270,8 +275,8 @@ function sendBidWonToGa(bid) {
270
275
_analyticsQueue . push ( function ( ) {
271
276
_eventCount ++ ;
272
277
if ( _sendFloors ) {
273
- var floor = ( bid . floorMin ) ? bid . floorMin : 'No Floor' ;
274
- window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Wins by Floor=' + floor , 'Ad Unit =' + bid . adUnitCode + ',' + bid . bidderCode , cpmCents , _disableInteraction ) ;
278
+ var floor = ( bid . floorData ) ? bid . floorData . floorValue : 'No Floor' ;
279
+ window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Wins by Floor=' + floor , 'Size =' + bid . size + ',' + bid . bidderCode , cpmCents , _disableInteraction ) ;
275
280
} else {
276
281
window [ _gaGlobal ] ( _trackerSend , 'event' , _category , 'Wins' , bid . bidderCode , cpmCents , _disableInteraction ) ;
277
282
}
0 commit comments