Skip to content

Commit

Permalink
Add meta.advertiserDomains support (#6870)
Browse files Browse the repository at this point in the history
Co-authored-by: francesco <[email protected]>
  • Loading branch information
onetag-dev and forazini authored May 28, 2021
1 parent 5b855a6 commit 7ce7b09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/onetagBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ function interpretResponse(serverResponse, bidderRequest) {
netRevenue: bid.netRevenue || false,
mediaType: bid.mediaType,
meta: {
mediaType: bid.mediaType
mediaType: bid.mediaType,
advertiserDomains: bid.adomain
},
ttl: bid.ttl || 300
};
Expand Down
8 changes: 6 additions & 2 deletions test/spec/modules/onetagBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ describe('onetag', function () {
expect(dataItem.creativeId).to.be.a('string');
expect(dataItem.netRevenue).to.be.a('boolean');
expect(dataItem.currency).to.be.a('string');
expect(dataItem.meta.advertiserDomains).to.be.an('array');
}
});
it('Returns an empty array if response is not valid', function () {
Expand Down Expand Up @@ -323,6 +324,7 @@ function getBannerVideoResponse() {
currency: 'USD',
requestId: 'banner',
mediaType: BANNER,
adomain: []
},
{
cpm: 13,
Expand All @@ -334,7 +336,8 @@ function getBannerVideoResponse() {
requestId: 'videoInstream',
vastUrl: 'https://videoinstream.org',
videoCacheKey: 'key',
mediaType: VIDEO
mediaType: VIDEO,
adomain: ['test_domain']
},
{
cpm: 13,
Expand All @@ -347,7 +350,8 @@ function getBannerVideoResponse() {
requestId: 'videoOutstream',
ad: '<?xml version="1.0" encoding="UTF-8"?><VAST version="2.0"></VAST>',
rendererUrl: 'https://testRenderer',
mediaType: VIDEO
mediaType: VIDEO,
adomain: []
}
]
}
Expand Down

0 comments on commit 7ce7b09

Please sign in to comment.