Skip to content

Commit

Permalink
Add meta.advertiserDomains to pbs adapter (prebid#5437)
Browse files Browse the repository at this point in the history
* Update prebidServerBidAdapter_spec.js

* Update index.js

* Update index.js

* Update index.js
  • Loading branch information
patmmccann authored Jul 17, 2020
1 parent b25e57d commit 2f861c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ const OPEN_RTB_PROTOCOL = {
bidObject.creativeId = bid.crid;
if (bid.burl) { bidObject.burl = bid.burl; }
bidObject.currency = (response.cur) ? response.cur : DEFAULT_S2S_CURRENCY;
bidObject.meta = bidObject.meta || {};
if (bid.adomain) { bidObject.meta.advertiserDomains = bid.adomain; }

// TODO: Remove when prebid-server returns ttl and netRevenue
const configTtl = _s2sConfig.defaultTtl || DEFAULT_S2S_TTL;
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,9 @@ describe('S2S Adapter', function () {
expect(response).to.have.property('bidderCode', 'appnexus');
expect(response).to.have.property('requestId', '123');
expect(response).to.have.property('cpm', 0.5);
expect(response).to.have.property('meta');
expect(response.meta).to.have.property('advertiserDomains');
expect(response.meta.advertiserDomains[0]).to.equal('appnexus.com');
expect(response).to.not.have.property('vastUrl');
expect(response).to.not.have.property('videoCacheKey');
expect(response).to.have.property('ttl', 60);
Expand Down

0 comments on commit 2f861c9

Please sign in to comment.