Skip to content

Commit

Permalink
Criteo: add mapping for bid adomain (#6915)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardlabat authored Jun 2, 2021
1 parent 1001c00 commit fe175cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export const spec = {
height: slot.height,
dealId: slot.dealCode,
};
if (slot.adomain) {
bid.meta = Object.assign({}, bid.meta, { advertiserDomains: slot.adomain });
}
if (slot.native) {
if (bidRequest.params.nativeCallback) {
bid.ad = createNativeAd(bidId, slot.native, bidRequest.params.nativeCallback);
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/criteoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ describe('The Criteo bidding adapter', function () {
width: 728,
height: 90,
dealCode: 'myDealCode',
adomain: ['criteo.com'],
}],
},
};
Expand All @@ -946,6 +947,7 @@ describe('The Criteo bidding adapter', function () {
expect(bids[0].width).to.equal(728);
expect(bids[0].height).to.equal(90);
expect(bids[0].dealId).to.equal('myDealCode');
expect(bids[0].meta.advertiserDomains[0]).to.equal('criteo.com');
});

it('should properly parse a bid response with a zoneId', function () {
Expand Down

0 comments on commit fe175cd

Please sign in to comment.