From 719523b765fd652cbc346d30230ae5a4abe08c00 Mon Sep 17 00:00:00 2001 From: AdmixerTech <35560933+AdmixerTech@users.noreply.github.com> Date: Wed, 13 Oct 2021 17:13:27 +0300 Subject: [PATCH] add docReferrer (#7551) Co-authored-by: atkachov --- modules/admixerBidAdapter.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/admixerBidAdapter.js b/modules/admixerBidAdapter.js index e136dfcfbdb..bb91ddcdfc8 100644 --- a/modules/admixerBidAdapter.js +++ b/modules/admixerBidAdapter.js @@ -19,9 +19,20 @@ export const spec = { * Make a server request from the list of BidRequests. */ buildRequests: function (validRequest, bidderRequest) { + let w; + let docRef; + do { + w = w ? w.parent : window; + try { + docRef = w.document.referrer; + } catch (e) { + break; + } + } while (w !== window.top); const payload = { imps: [], ortb2: config.getConfig('ortb2'), + docReferrer: docRef, }; let endpointUrl; if (bidderRequest) {