Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zemanta adapter: add meta.advertiserDomains #6517

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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