Skip to content

Commit

Permalink
Fixed use of adUnitId for analytics purpose (prebid#11160)
Browse files Browse the repository at this point in the history
Co-authored-by: pm-azhar-mulla <azhar@L1119.local>
  • Loading branch information
pm-azhar-mulla and pm-azhar-mulla authored Mar 1, 2024
1 parent e97e700 commit 9427cd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/pubmaticAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function executeBidsLoggerCall(e, highestCpmBids) {
// getGptSlotInfoForAdUnitCode returns gptslot corresponding to adunit provided as input.
let slotObject = {
'sn': adUnitId,
'au': origAdUnit.adUnitId || getGptSlotInfoForAdUnitCode(adUnitId)?.gptSlot || adUnitId,
'au': origAdUnit.owAdUnitId || getGptSlotInfoForAdUnitCode(adUnitId)?.gptSlot || adUnitId,
'mt': getAdUnitAdFormats(origAdUnit),
'sz': getSizesForAdUnit(adUnit, adUnitId),
'ps': gatherPartnerBidsForAdUnitForLogger(adUnit, adUnitId, highestCpmBids.filter(bid => bid.adUnitCode === adUnitId)),
Expand Down Expand Up @@ -450,6 +450,7 @@ function executeBidWonLoggerCall(auctionId, adUnitId) {
return;
}
let origAdUnit = getAdUnit(cache.auctions[auctionId].origAdUnits, adUnitId) || {};
let owAdUnitId = origAdUnit.owAdUnitId || getGptSlotInfoForAdUnitCode(adUnitId)?.gptSlot || adUnitId;
let auctionCache = cache.auctions[auctionId];
let floorData = auctionCache.floorData;
let wiid = cache.auctions[auctionId]?.wiid || auctionId;
Expand All @@ -466,7 +467,7 @@ function executeBidWonLoggerCall(auctionId, adUnitId) {
pixelURL += '&pid=' + enc(profileId);
pixelURL += '&pdvid=' + enc(profileVersionId);
pixelURL += '&slot=' + enc(adUnitId);
pixelURL += '&au=' + enc(origAdUnit.adUnitId || adUnitId);
pixelURL += '&au=' + enc(owAdUnitId);
pixelURL += '&pn=' + enc(adapterName);
pixelURL += '&bc=' + enc(winningBid.bidderCode || winningBid.bidder);
pixelURL += '&en=' + enc(winningBid.bidResponse.bidPriceUSD);
Expand Down

0 comments on commit 9427cd3

Please sign in to comment.