From 382ab369c0d4aca68adb962141955078f9fc747c Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:05:16 -0500 Subject: [PATCH 01/12] Update ttdBidAdapter.js --- modules/ttdBidAdapter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ttdBidAdapter.js b/modules/ttdBidAdapter.js index 4919442336f..16a5bfacb5d 100644 --- a/modules/ttdBidAdapter.js +++ b/modules/ttdBidAdapter.js @@ -458,7 +458,7 @@ export const spec = { { width: bid.w, height: bid.h, - ad: utils.replaceAuctionPrice(bid.adm, cpm), + ad: utils.replaceAuctionPrice(bid.adm, bid.originalCpm), mediaType: BANNER } ); @@ -472,9 +472,9 @@ export const spec = { } ); if (bid.nurl) { - bidResponse.vastUrl = utils.replaceAuctionPrice(bid.nurl, cpm); + bidResponse.vastUrl = utils.replaceAuctionPrice(bid.nurl, bid.originalCpm); } else { - bidResponse.vastXml = utils.replaceAuctionPrice(bid.adm, cpm); + bidResponse.vastXml = utils.replaceAuctionPrice(bid.adm, bid.originalCpm); } } From 83ab5a38f48969b152a298954d3e923decafc851 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:41:28 -0500 Subject: [PATCH 02/12] Update prebid.js --- src/prebid.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/prebid.js b/src/prebid.js index 0689b301303..712ea01cc31 100644 --- a/src/prebid.js +++ b/src/prebid.js @@ -446,9 +446,8 @@ $$PREBID_GLOBAL$$.renderAd = hook('async', function (doc, id, options) { if (shouldRender) { // replace macros according to openRTB with price paid = bid.cpm - bid.ad = replaceAuctionPrice(bid.ad, bid.cpm); - bid.adUrl = replaceAuctionPrice(bid.adUrl, bid.cpm); - + bid.ad = replaceAuctionPrice(bid.ad, bid.originalCpm || bid.cpm); + bid.adUrl = replaceAuctionPrice(bid.adUrl, bid.originalCpm || bid.cpm); // replacing clickthrough if submitted if (options && options.clickThrough) { const {clickThrough} = options; From e9edfce92c396604d5a73461b9d92343567589e4 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:45:58 -0500 Subject: [PATCH 03/12] Update secureCreatives.js --- src/secureCreatives.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/secureCreatives.js b/src/secureCreatives.js index 587b68b20bd..696334cc6ce 100644 --- a/src/secureCreatives.js +++ b/src/secureCreatives.js @@ -161,7 +161,7 @@ function handleEventRequest(reply, data, adObject) { } export function _sendAdToCreative(adObject, reply) { - const { adId, ad, adUrl, width, height, renderer, cpm } = adObject; + const { adId, ad, adUrl, width, height, renderer, cpm, originalCpm } = adObject; // rendering for outstream safeframe if (isRendererRequired(renderer)) { executeRenderer(renderer, adObject); @@ -169,8 +169,8 @@ export function _sendAdToCreative(adObject, reply) { resizeRemoteCreative(adObject); reply({ message: 'Prebid Response', - ad: replaceAuctionPrice(ad, cpm), - adUrl: replaceAuctionPrice(adUrl, cpm), + ad: replaceAuctionPrice(ad, originalCpm || cpm), + adUrl: replaceAuctionPrice(adUrl, originalCpm || cpm), adId, width, height From 1c752e1f6e701d033580dc396fc8184050a40806 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:48:34 -0500 Subject: [PATCH 04/12] Update apacdexBidAdapter.js --- modules/apacdexBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apacdexBidAdapter.js b/modules/apacdexBidAdapter.js index 421eb99b4c1..3ca3b02d98f 100644 --- a/modules/apacdexBidAdapter.js +++ b/modules/apacdexBidAdapter.js @@ -197,9 +197,9 @@ export const spec = { bidResponse.dealId = dealId; } if (bid.vastXml) { - bidResponse.vastXml = replaceAuctionPrice(bid.vastXml, bid.cpm); + bidResponse.vastXml = replaceAuctionPrice(bid.vastXml, bid.originalCpm); } else { - bidResponse.ad = replaceAuctionPrice(bid.ad, bid.cpm); + bidResponse.ad = replaceAuctionPrice(bid.ad, bid.originalCpm); } bidResponse.meta = {}; if (bid.meta && bid.meta.advertiserDomains && isArray(bid.meta.advertiserDomains)) { From e772c9e50fd7ecb41bff66091d8d389f0a3dd674 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:49:49 -0500 Subject: [PATCH 05/12] Update brightMountainMediaBidAdapter.js --- modules/brightMountainMediaBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/brightMountainMediaBidAdapter.js b/modules/brightMountainMediaBidAdapter.js index d3ae1d9cf43..af704cf6422 100644 --- a/modules/brightMountainMediaBidAdapter.js +++ b/modules/brightMountainMediaBidAdapter.js @@ -126,9 +126,9 @@ export const spec = { }; if (tempResponse.mediaType === BANNER) { - tempResponse.ad = replaceAuctionPrice(bid.adm, bid.price); + tempResponse.ad = replaceAuctionPrice(bid.adm, bid.originalCpm || bid.price); } else { - tempResponse.vastXml = replaceAuctionPrice(bid.adm, bid.price); + tempResponse.vastXml = replaceAuctionPrice(bid.adm, bid.originalCpm || bid.price); } bidResponse.push(tempResponse); From 7d6f273f27da2d9aeec9dfc6237d06d660011db0 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:50:56 -0500 Subject: [PATCH 06/12] Update axonixBidAdapter.js --- modules/axonixBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/axonixBidAdapter.js b/modules/axonixBidAdapter.js index 7cd8f63bd2a..a790a89a0c1 100644 --- a/modules/axonixBidAdapter.js +++ b/modules/axonixBidAdapter.js @@ -177,7 +177,7 @@ export const spec = { const { nurl } = bid || {}; if (bid.nurl) { - triggerPixel(replaceAuctionPrice(nurl, bid.cpm)); + triggerPixel(replaceAuctionPrice(nurl, bid.originalCpm || bid.cpm)); }; } } From e43c5b4fc40fa874ab1d73bd0156bd8cbbf1d1fa Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:52:27 -0500 Subject: [PATCH 07/12] Update koblerBidAdapter.js --- modules/koblerBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/koblerBidAdapter.js b/modules/koblerBidAdapter.js index 49be80e969c..80aa038a9f7 100644 --- a/modules/koblerBidAdapter.js +++ b/modules/koblerBidAdapter.js @@ -63,7 +63,7 @@ export const onBidWon = function (bid) { const adServerPrice = deepAccess(bid, 'adserverTargeting.hb_pb', 0); const adServerPriceCurrency = config.getConfig('currency.adServerCurrency') || SUPPORTED_CURRENCY; if (isStr(bid.nurl) && bid.nurl !== '') { - const winNotificationUrl = replaceAuctionPrice(bid.nurl, cpm) + const winNotificationUrl = replaceAuctionPrice(bid.nurl, bid.originalCpm || cpm) .replace(/\${AUCTION_PRICE_CURRENCY}/g, cpmCurrency) .replace(/\${AD_SERVER_PRICE}/g, adServerPrice) .replace(/\${AD_SERVER_PRICE_CURRENCY}/g, adServerPriceCurrency); From 5369db6a263b773bd42fcfb9fb31eec8c471f4fb Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 09:56:49 -0500 Subject: [PATCH 08/12] Update mediaforceBidAdapter.js --- modules/mediaforceBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mediaforceBidAdapter.js b/modules/mediaforceBidAdapter.js index 7d4f22b7916..c686a2e378d 100644 --- a/modules/mediaforceBidAdapter.js +++ b/modules/mediaforceBidAdapter.js @@ -262,7 +262,7 @@ export const spec = { onBidWon: function(bid) { const cpm = deepAccess(bid, 'adserverTargeting.hb_pb') || ''; if (isStr(bid.burl) && bid.burl !== '') { - bid.burl = replaceAuctionPrice(bid.burl, cpm); + bid.burl = replaceAuctionPrice(bid.burl, bid.originalCpm || cpm); triggerPixel(bid.burl); } }, From d128c5941e44cd1c8a76b824f17424933d228670 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 10:15:33 -0500 Subject: [PATCH 09/12] Update ttdBidAdapter.js --- modules/ttdBidAdapter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ttdBidAdapter.js b/modules/ttdBidAdapter.js index 16a5bfacb5d..4558ba47f8e 100644 --- a/modules/ttdBidAdapter.js +++ b/modules/ttdBidAdapter.js @@ -458,7 +458,7 @@ export const spec = { { width: bid.w, height: bid.h, - ad: utils.replaceAuctionPrice(bid.adm, bid.originalCpm), + ad: utils.replaceAuctionPrice(bid.adm, bid.originalCpm || cpm), mediaType: BANNER } ); @@ -472,9 +472,9 @@ export const spec = { } ); if (bid.nurl) { - bidResponse.vastUrl = utils.replaceAuctionPrice(bid.nurl, bid.originalCpm); + bidResponse.vastUrl = utils.replaceAuctionPrice(bid.nurl, bid.originalCpm || cpm); } else { - bidResponse.vastXml = utils.replaceAuctionPrice(bid.adm, bid.originalCpm); + bidResponse.vastXml = utils.replaceAuctionPrice(bid.adm, bid.originalCpm || cpm); } } From 67974f020f60a95be681fadf0e6ef728926de29d Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 12:47:20 -0500 Subject: [PATCH 10/12] Update apacdexBidAdapter.js --- modules/apacdexBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apacdexBidAdapter.js b/modules/apacdexBidAdapter.js index 3ca3b02d98f..421eb99b4c1 100644 --- a/modules/apacdexBidAdapter.js +++ b/modules/apacdexBidAdapter.js @@ -197,9 +197,9 @@ export const spec = { bidResponse.dealId = dealId; } if (bid.vastXml) { - bidResponse.vastXml = replaceAuctionPrice(bid.vastXml, bid.originalCpm); + bidResponse.vastXml = replaceAuctionPrice(bid.vastXml, bid.cpm); } else { - bidResponse.ad = replaceAuctionPrice(bid.ad, bid.originalCpm); + bidResponse.ad = replaceAuctionPrice(bid.ad, bid.cpm); } bidResponse.meta = {}; if (bid.meta && bid.meta.advertiserDomains && isArray(bid.meta.advertiserDomains)) { From 7d1fb498088f54efaaee04e161b22af8b4ab7816 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 12:48:00 -0500 Subject: [PATCH 11/12] Update brightMountainMediaBidAdapter.js --- modules/brightMountainMediaBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/brightMountainMediaBidAdapter.js b/modules/brightMountainMediaBidAdapter.js index af704cf6422..d3ae1d9cf43 100644 --- a/modules/brightMountainMediaBidAdapter.js +++ b/modules/brightMountainMediaBidAdapter.js @@ -126,9 +126,9 @@ export const spec = { }; if (tempResponse.mediaType === BANNER) { - tempResponse.ad = replaceAuctionPrice(bid.adm, bid.originalCpm || bid.price); + tempResponse.ad = replaceAuctionPrice(bid.adm, bid.price); } else { - tempResponse.vastXml = replaceAuctionPrice(bid.adm, bid.originalCpm || bid.price); + tempResponse.vastXml = replaceAuctionPrice(bid.adm, bid.price); } bidResponse.push(tempResponse); From b113fdfe5e16e88cd7fe74c9bdd05f7891bd2011 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 11 Mar 2022 12:48:31 -0500 Subject: [PATCH 12/12] Update ttdBidAdapter.js --- modules/ttdBidAdapter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ttdBidAdapter.js b/modules/ttdBidAdapter.js index 4558ba47f8e..4919442336f 100644 --- a/modules/ttdBidAdapter.js +++ b/modules/ttdBidAdapter.js @@ -458,7 +458,7 @@ export const spec = { { width: bid.w, height: bid.h, - ad: utils.replaceAuctionPrice(bid.adm, bid.originalCpm || cpm), + ad: utils.replaceAuctionPrice(bid.adm, cpm), mediaType: BANNER } ); @@ -472,9 +472,9 @@ export const spec = { } ); if (bid.nurl) { - bidResponse.vastUrl = utils.replaceAuctionPrice(bid.nurl, bid.originalCpm || cpm); + bidResponse.vastUrl = utils.replaceAuctionPrice(bid.nurl, cpm); } else { - bidResponse.vastXml = utils.replaceAuctionPrice(bid.adm, bid.originalCpm || cpm); + bidResponse.vastXml = utils.replaceAuctionPrice(bid.adm, cpm); } }