Skip to content

Commit

Permalink
Add referrer to ix adapter (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
florevallatmrf authored and alexmrf committed May 21, 2018
1 parent 390c895 commit 3ca8ad4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,17 @@ export const spec = {
r.imp = bannerImps;
r.site = {};
r.site.page = utils.getTopWindowUrl();
r.site.ref = utils.getTopWindowReferrer();
r.ext = {};
r.ext.source = 'prebid';

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.
if (options && options.gdprConsent) {
const gdprConsent = options.gdprConsent;
Expand Down

0 comments on commit 3ca8ad4

Please sign in to comment.