Describe the bug
There is an inconsistency between AMP/mobile and "normal" pages when expanding the AUCTION_PRICE macro.
-
Prebid expands it on both ad markup and ad URL: https://github.com/prebid/Prebid.js/blob/f407e47f96f12834bd79092bc1b5bd0203967598/src/prebid.js#L506-L507
-
on AMP (or other scenarios where PBS cache sources the ad), PUC will only replace it on ad markup:
|
if(auctionPrice) { // replace ${AUCTION_PRICE} macro with the bidObject.price or hb_pb. |
|
bidObject.adm = bidObject.adm.replace('${AUCTION_PRICE}', auctionPrice); |
|
} else { |
|
/* |
|
From OpenRTB spec 2.5: If the source value is an optional parameter that was not specified, the macro will simply be removed (i.e., replaced with a zero-length string). |
|
*/ |
|
bidObject.adm = bidObject.adm.replace('${AUCTION_PRICE}', ''); |
|
} |
Describe the bug
There is an inconsistency between AMP/mobile and "normal" pages when expanding the
AUCTION_PRICEmacro.Prebid expands it on both ad markup and ad URL: https://github.com/prebid/Prebid.js/blob/f407e47f96f12834bd79092bc1b5bd0203967598/src/prebid.js#L506-L507
on AMP (or other scenarios where PBS cache sources the ad), PUC will only replace it on ad markup:
prebid-universal-creative/src/renderingManager.js
Lines 225 to 232 in 68d81fc