Skip to content

Commit

Permalink
convert bidders: insticator
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed May 20, 2022
1 parent 729a870 commit cead162
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions modules/insticatorBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 4 additions & 2 deletions test/spec/modules/insticatorBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
},
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cead162

Please sign in to comment.