Skip to content

Commit

Permalink
add adomain to bid.meta in telaria adapter (#5400)
Browse files Browse the repository at this point in the history
* add adomain to bid.meta in telaria adapter

this puts the adomain key in the right spot, related to #5358 and partially solves #3115 for Telaria
  • Loading branch information
patmmccann authored Jun 29, 2020
1 parent e8025ae commit 60897b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions modules/telariaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ function createBid(status, reqBid, response, width, height, bidderCode) {
});
}

bid.meta = bid.meta || {};
if (response && response.adomain && response.adomain.length > 0) {
bid.meta.advertiserDomains = response.adomain;
}

return bid;
}

Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/telariaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe('TelariaAdapter', () => {
it('should get correct bid response', () => {
let expectedResponseKeys = ['bidderCode', 'width', 'height', 'statusMessage', 'adId', 'mediaType', 'source',
'getStatusCode', 'getSize', 'requestId', 'cpm', 'creativeId', 'vastXml',
'vastUrl', 'currency', 'netRevenue', 'ttl', 'ad'];
'vastUrl', 'currency', 'netRevenue', 'ttl', 'ad', 'meta'];

let bidRequest = spec.buildRequests(stub, BIDDER_REQUEST)[0];
bidRequest.bidId = '1234';
Expand Down

0 comments on commit 60897b1

Please sign in to comment.