Skip to content

Commit

Permalink
Ccx Bid Adapter: adomain support (prebid#6595)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaworskiccx authored and umakajan committed May 6, 2021
1 parent 86832dd commit 875f3cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions modules/ccxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ function _buildResponse (bid, currency, ttl) {
currency: currency
}

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

if (bid.ext.type === 'video') {
resp.vastXml = bid.adm
} else {
Expand Down
15 changes: 12 additions & 3 deletions test/spec/modules/ccxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ describe('ccxAdapter', function () {
netRevenue: false,
ttl: 5,
currency: 'PLN',
ad: '<script>TEST</script>'
ad: '<script>TEST</script>',
meta: {
advertiserDomains: ['clickonometrics.com']
}
},
{
requestId: '2e56e1af51a5d8',
Expand All @@ -348,7 +351,10 @@ describe('ccxAdapter', function () {
netRevenue: false,
ttl: 5,
currency: 'PLN',
vastXml: '<xml>'
vastXml: '<xml>',
meta: {
advertiserDomains: ['clickonometrics.com']
}
}
];
expect(spec.interpretResponse({body: response})).to.deep.have.same.members(bidResponses);
Expand All @@ -366,7 +372,10 @@ describe('ccxAdapter', function () {
netRevenue: false,
ttl: 5,
currency: 'PLN',
ad: '<script>TEST</script>'
ad: '<script>TEST</script>',
meta: {
advertiserDomains: ['clickonometrics.com']
}
}
];
expect(spec.interpretResponse({body: response})).to.deep.have.same.members(bidResponses);
Expand Down

0 comments on commit 875f3cb

Please sign in to comment.