Skip to content

Commit 16fe398

Browse files
author
Brandon Ling
authored
Merge pull request #11 from triplelift-internal/TL-18499-add-adomain-support
TL-18499: Add advertiserDomains support
2 parents b9d8b91 + 0a700ff commit 16fe398

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

modules/tripleliftBidAdapter.js

+4
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ function _buildResponseObject(bidderRequest, bid) {
293293
if (bid.advertiser_name) {
294294
bidResponse.meta.advertiserName = bid.advertiser_name;
295295
}
296+
297+
if (bid.adomain && bid.adomain.length) {
298+
bidResponse.meta.advertiserDomains = bid.adomain;
299+
}
296300
};
297301
return bidResponse;
298302
}

test/spec/modules/tripleliftBidAdapter_spec.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,8 @@ describe('triplelift adapter', function () {
638638
ad: 'ad-markup',
639639
iurl: 'https://s.adroll.com/a/IYR/N36/IYRN366MFVDITBAGNNT5U6.jpg',
640640
tl_source: 'tlx',
641-
advertiser_name: 'fake advertiser name'
641+
advertiser_name: 'fake advertiser name',
642+
adomain: ['basspro.com', 'internetalerts.org']
642643
},
643644
{
644645
imp_id: 1,
@@ -747,6 +748,13 @@ describe('triplelift adapter', function () {
747748
expect(result[0].meta.advertiserName).to.equal('fake advertiser name');
748749
expect(result[1].meta).to.not.have.key('advertiserName');
749750
});
751+
752+
it('should include the advertiser domain array in the meta field if available', function () {
753+
let result = tripleliftAdapterSpec.interpretResponse(response, {bidderRequest});
754+
expect(result[0].meta.advertiserDomains[0]).to.equal('basspro.com');
755+
expect(result[0].meta.advertiserDomains[1]).to.equal('internetalerts.org');
756+
expect(result[1].meta).to.not.have.key('advertiserDomains');
757+
});
750758
});
751759

752760
describe('getUserSyncs', function() {

0 commit comments

Comments
 (0)