diff --git a/modules/consumableBidAdapter.js b/modules/consumableBidAdapter.js index de08fc8677a..afdf34b72c1 100644 --- a/modules/consumableBidAdapter.js +++ b/modules/consumableBidAdapter.js @@ -47,8 +47,8 @@ export const spec = { const data = Object.assign({ placements: [], time: Date.now(), - url: bidderRequest.refererInfo.referer, - referrer: document.referrer, + url: bidderRequest.refererInfo.page, + referrer: bidderRequest.refererInfo.ref, source: [{ 'name': 'prebidjs', 'version': '$prebid.version$' @@ -123,7 +123,7 @@ export const spec = { bid.creativeId = decision.adId; bid.ttl = 30; bid.netRevenue = true; - bid.referrer = bidRequest.bidderRequest.refererInfo.referer; + bid.referrer = bidRequest.bidderRequest.refererInfo.page; bid.meta = { advertiserDomains: decision.adomain || [] diff --git a/modules/contentexchangeBidAdapter.js b/modules/contentexchangeBidAdapter.js index b3a5056f816..906359252ee 100644 --- a/modules/contentexchangeBidAdapter.js +++ b/modules/contentexchangeBidAdapter.js @@ -127,7 +127,7 @@ export const spec = { winLocation = window.location; } - const refferUrl = bidderRequest.refererInfo && bidderRequest.refererInfo.referer; + const refferUrl = bidderRequest.refererInfo && bidderRequest.refererInfo.page; let refferLocation; try { refferLocation = refferUrl && new URL(refferUrl); @@ -135,6 +135,7 @@ export const spec = { logMessage(e); } + // TODO: does the fallback to 'window.location' make sense? let location = refferLocation || winLocation; const language = (navigator && navigator.language) ? navigator.language.split('-')[0] : ''; const host = location.host; diff --git a/modules/conversantBidAdapter.js b/modules/conversantBidAdapter.js index d703504b228..f0ffb2af113 100644 --- a/modules/conversantBidAdapter.js +++ b/modules/conversantBidAdapter.js @@ -54,7 +54,7 @@ export const spec = { * @return {ServerRequest} Info describing the request to the server. */ buildRequests: function(validBidRequests, bidderRequest) { - const page = (bidderRequest && bidderRequest.refererInfo) ? bidderRequest.refererInfo.referer : ''; + const page = (bidderRequest && bidderRequest.refererInfo) ? bidderRequest.refererInfo.page : ''; let siteId = ''; let requestId = ''; let pubcid = null; diff --git a/test/spec/modules/conversantBidAdapter_spec.js b/test/spec/modules/conversantBidAdapter_spec.js index 74bc32f0ff7..69006c8edc7 100644 --- a/test/spec/modules/conversantBidAdapter_spec.js +++ b/test/spec/modules/conversantBidAdapter_spec.js @@ -234,7 +234,7 @@ describe('Conversant adapter tests', function() { const page = 'http://test.com?a=b&c=123'; const bidderRequest = { refererInfo: { - referer: page + page: page } }; const request = spec.buildRequests(bidRequests, bidderRequest); @@ -362,7 +362,7 @@ describe('Conversant adapter tests', function() { it('Verify first party data', () => { const bidderRequest = { - refererInfo: {referer: 'http://test.com?a=b&c=123'}, + refererInfo: {page: 'http://test.com?a=b&c=123'}, ortb2: {site: {content: {series: 'MySeries', season: 'MySeason', episode: 3, title: 'MyTitle'}}} }; const request = spec.buildRequests(bidRequests, bidderRequest); @@ -375,7 +375,7 @@ describe('Conversant adapter tests', function() { }); it('Verify supply chain data', () => { - const bidderRequest = {refererInfo: {referer: 'http://test.com?a=b&c=123'}}; + const bidderRequest = {refererInfo: {page: 'http://test.com?a=b&c=123'}}; const schain = {complete: 1, ver: '1.0', nodes: [{asi: 'bidderA.com', sid: '00001', hp: 1}]}; const bidsWithSchain = bidRequests.map((bid) => { return Object.assign({