Skip to content

Commit

Permalink
Zemanta adapter: add advertiserDomains (prebid#6517)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rok Sušnik authored and stsepelin committed May 28, 2021
1 parent 2ac6c1b commit f58a2cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions modules/zemantaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export const spec = {
bidObject.width = bidResponse.w;
bidObject.height = bidResponse.h;
}
bidObject.meta = {};
if (bidResponse.adomain && bidResponse.adomain.length > 0) {
bidObject.meta.advertiserDomains = bidResponse.adomain;
}
return bidObject;
}
}).filter(Boolean);
Expand Down
14 changes: 12 additions & 2 deletions test/spec/modules/zemantaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ describe('Zemanta Adapter', function () {
nurl: 'http://example.com/win/${AUCTION_PRICE}',
adm: '{"ver":"1.2","assets":[{"id":3,"required":1,"img":{"url":"http://example.com/img/url","w":120,"h":100}},{"id":0,"required":1,"title":{"text":"Test title"}},{"id":5,"data":{"value":"Test sponsor"}}],"link":{"url":"http://example.com/click/url"},"eventtrackers":[{"event":1,"method":1,"url":"http://example.com/impression"}]}',
adomain: [
'example.co'
'example.com'
],
cid: '3487171',
crid: '28023739',
Expand Down Expand Up @@ -386,6 +386,11 @@ describe('Zemanta Adapter', function () {
currency: 'USD',
mediaType: 'native',
nurl: 'http://example.com/win/${AUCTION_PRICE}',
meta: {
'advertiserDomains': [
'example.com'
]
},
native: {
clickTrackers: undefined,
clickUrl: 'http://example.com/click/url',
Expand Down Expand Up @@ -459,7 +464,12 @@ describe('Zemanta Adapter', function () {
nurl: 'http://example.com/win/${AUCTION_PRICE}',
ad: '<div>ad</div>',
width: 300,
height: 250
height: 250,
meta: {
'advertiserDomains': [
'example.com'
]
},
}
]

Expand Down

0 comments on commit f58a2cb

Please sign in to comment.