From 4ebeb855043b53f2e87a9c96602b71a2397b5125 Mon Sep 17 00:00:00 2001 From: florevallatmrf <32760132+florevallatmrf@users.noreply.github.com> Date: Mon, 21 May 2018 11:40:42 +0200 Subject: [PATCH] Add referrer to ix adapter (#6) --- modules/ixBidAdapter.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index 72dec5bd083..bec5f4c1ca3 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -205,11 +205,16 @@ export const spec = { r.imp = bannerImps; r.site = {}; + r.site.page = utils.getTopWindowUrl(); r.ext = {}; r.ext.source = 'prebid'; - if (document.referrer && document.referrer !== '') { - r.site.ref = document.referrer; + const referrer = validBidRequests[0].params.referrer; + + if (referrer) { + r.site.ref = referrer; + } else { + r.site.ref = utils.getTopWindowReferrer(); } // Apply GDPR information to the request if GDPR is enabled.