Skip to content

Commit

Permalink
Onetag Bid Adapter: add reading of ortb2Imp field (#11539)
Browse files Browse the repository at this point in the history
  • Loading branch information
fliccione authored May 22, 2024
1 parent 1400fbe commit 4d0d0b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/onetagBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ function setGeneralInfo(bidRequest) {
this['gpid'] = deepAccess(bidRequest, 'ortb2Imp.ext.gpid') || deepAccess(bidRequest, 'ortb2Imp.ext.data.pbadslot');
this['pubId'] = params.pubId;
this['ext'] = params.ext;
this['ortb2Imp'] = deepAccess(bidRequest, 'ortb2Imp');
if (params.pubClick) {
this['click'] = params.pubClick;
}
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/onetagBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ describe('onetag', function () {
'bidId',
'bidderRequestId',
'pubId',
'ortb2Imp',
'transactionId',
'context',
'playerSize',
Expand All @@ -240,6 +241,7 @@ describe('onetag', function () {
'bidId',
'bidderRequestId',
'pubId',
'ortb2Imp',
'transactionId',
'mediaTypeInfo',
'sizes',
Expand Down Expand Up @@ -270,6 +272,7 @@ describe('onetag', function () {
expect(payload.bids).to.exist.and.to.have.length(1);
expect(payload.bids[0].auctionId).to.equal(bannerBid.ortb2.source.tid);
expect(payload.bids[0].transactionId).to.equal(bannerBid.ortb2Imp.ext.tid);
expect(payload.bids[0].ortb2Imp).to.deep.equal(bannerBid.ortb2Imp);
});
it('should send GDPR consent data', function () {
let consentString = 'consentString';
Expand Down

0 comments on commit 4d0d0b7

Please sign in to comment.