Skip to content

Commit

Permalink
Adnuntius Bid Adatpter: Meta field advertiser domain update. (prebid#…
Browse files Browse the repository at this point in the history
…6652)

* RTD Provider rebase

* wrongly merged to master

* Added meta field for advertiser domains.
  • Loading branch information
mikael-lundin authored and umakajan committed May 6, 2021
1 parent c6716ba commit aa4abdb
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/adnuntiusBidAdapter.js
Original file line number Diff line number Diff line change
@@ -56,6 +56,10 @@ export const spec = {
height: Number(bid.creativeHeight),
creativeId: bid.creativeId,
currency: (bid.bid) ? bid.bid.currency : 'EUR',
meta: {
advertiserDomains: (bid.destinationUrls.destination) ? [bid.destinationUrls.destination.split('/')[2]] : []

},
netRevenue: false,
ttl: 360,
ad: adUnit.html
3 changes: 3 additions & 0 deletions test/spec/modules/adnuntiusBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -123,6 +123,9 @@ describe('adnuntiusBidAdapter', function () {
expect(interpretedResponse[0].creativeId).to.equal(ad.creativeId);
expect(interpretedResponse[0].currency).to.equal(ad.bid.currency);
expect(interpretedResponse[0].netRevenue).to.equal(false);
expect(interpretedResponse[0].meta).to.have.property('advertiserDomains');
expect(interpretedResponse[0].meta.advertiserDomains).to.have.lengthOf(1);
expect(interpretedResponse[0].meta.advertiserDomains[0]).to.equal('google.com');
expect(interpretedResponse[0].ad).to.equal(serverResponse.body.adUnits[0].html);
expect(interpretedResponse[0].ttl).to.equal(360);
});

0 comments on commit aa4abdb

Please sign in to comment.