diff --git a/modules/criteoBidAdapter.js b/modules/criteoBidAdapter.js index c10e370eef2..75c61c7ae73 100644 --- a/modules/criteoBidAdapter.js +++ b/modules/criteoBidAdapter.js @@ -56,7 +56,7 @@ var CriteoAdapter = function CriteoAdapter() { var size = (width && height) ? [new Criteo.PubTag.DirectBidding.Size(width, height)] : null; - var sizes = size || sizes.map((sizeString) => { + sizes = size || sizes.map((sizeString) => { var xIndex = sizeString.indexOf('x'); var w = parseInt(sizeString.substring(0, xIndex)); var h = parseInt(sizeString.substring(xIndex + 1, sizeString.length)) diff --git a/modules/openxBidAdapter.js b/modules/openxBidAdapter.js index 426362e0d9c..0732afb0c26 100644 --- a/modules/openxBidAdapter.js +++ b/modules/openxBidAdapter.js @@ -212,6 +212,10 @@ const OpenxAdapter = function OpenxAdapter() { } } + function retrieveReferrer(bids) { + return bids.map(b => b.params.referrer).find(url => !!url); + } + function callBids(params) { let isIfr; const bids = params.bids || []; @@ -233,9 +237,11 @@ const OpenxAdapter = function OpenxAdapter() { timeout = params.timeout; } + const referrer = retrieveReferrer(bids); + buildRequest(bids, { - ju: currentURL, - jr: currentURL, + ju: referrer || currentURL, + jr: referrer || currentURL, ch: document.charSet || document.characterSet, res: `${screen.width}x${screen.height}x${screen.colorDepth}`, ifr: isIfr,