From cead162b401eb009466c10fc505bce0213f8c07f Mon Sep 17 00:00:00 2001 From: Demetrio Girardi Date: Fri, 20 May 2022 10:38:11 -0700 Subject: [PATCH] convert bidders: insticator --- modules/insticatorBidAdapter.js | 7 ++++--- test/spec/modules/insticatorBidAdapter_spec.js | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/insticatorBidAdapter.js b/modules/insticatorBidAdapter.js index c967f530e75..07f2545aed4 100644 --- a/modules/insticatorBidAdapter.js +++ b/modules/insticatorBidAdapter.js @@ -162,9 +162,10 @@ function buildRequest(validBidRequests, bidderRequest) { tid: bidderRequest.auctionId, }, site: { - domain: location.hostname, - page: location.href, - ref: bidderRequest.refererInfo.referer, + // TODO: are these the right refererInfo values? + domain: bidderRequest.refererInfo.domain, + page: bidderRequest.refererInfo.page, + ref: bidderRequest.refererInfo.ref, }, device: buildDevice(), regs: buildRegs(bidderRequest), diff --git a/test/spec/modules/insticatorBidAdapter_spec.js b/test/spec/modules/insticatorBidAdapter_spec.js index 03e034f060a..1fdbaa5765a 100644 --- a/test/spec/modules/insticatorBidAdapter_spec.js +++ b/test/spec/modules/insticatorBidAdapter_spec.js @@ -73,7 +73,9 @@ describe('InsticatorBidAdapter', function () { refererInfo: { numIframes: 0, reachedTop: true, - referer: 'https://example.com', + page: 'https://example.com', + domain: 'example.com', + ref: 'https://referrer.com', stack: ['https://example.com'] }, }; @@ -199,7 +201,7 @@ describe('InsticatorBidAdapter', function () { expect(data.site).to.be.an('object'); expect(data.site.domain).not.to.be.empty; expect(data.site.page).not.to.be.empty; - expect(data.site.ref).to.equal(bidderRequest.refererInfo.referer); + expect(data.site.ref).to.equal(bidderRequest.refererInfo.ref); expect(data.device).to.be.an('object'); expect(data.device.w).to.equal(window.innerWidth); expect(data.device.h).to.equal(window.innerHeight);