Skip to content

Commit

Permalink
PBJS IX adapter should signal 1PA (#7596)
Browse files Browse the repository at this point in the history
Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com>
  • Loading branch information
shahinrahbariasl and shahin-rahbariasl authored Oct 19, 2021
1 parent 8fed466 commit a68796a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
r.ext.ixdiag.msd = 0;
r.ext.ixdiag.msi = 0;
r.imp = [];
r.at = 1;

// getting ixdiags for adunits of the video, outstream & multi format (MF) style
let ixdiag = buildIXDiag(validBidRequests);
Expand Down
10 changes: 10 additions & 0 deletions test/spec/modules/ixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,11 @@ describe('IndexexchangeAdapter', function () {
expect(requestUrl).to.equal(IX_SECURE_ENDPOINT);
});

it('auction type should be set correctly', function () {
const at = JSON.parse(query.r).at;
expect(at).to.equal(1);
})

it('query object (version, siteID and request) should be correct', function () {
expect(query.v).to.equal(BANNER_ENDPOINT_VERSION);
expect(query.s).to.equal(DEFAULT_BANNER_VALID_BID[0].params.siteId);
Expand Down Expand Up @@ -1929,6 +1934,11 @@ describe('IndexexchangeAdapter', function () {
expect(query.nf).to.equal(1);
});

it('auction type should be set correctly', function () {
const at = JSON.parse(query.r).at;
expect(at).to.equal(1);
})

it('impression should have correct format and value', function () {
const impression = JSON.parse(query.r).imp[0];
const sidValue = utils.parseGPTSingleSizeArray(DEFAULT_VIDEO_VALID_BID[0].params.size);
Expand Down

0 comments on commit a68796a

Please sign in to comment.