Skip to content

Commit

Permalink
Mediaimpact Bid Adapter: move advertiserDomains, primaryCatId, second…
Browse files Browse the repository at this point in the history
…aryCatIds to ad.meta (prebid#11637)

* Add mediaimpact bid adapter

* Add mediaimpact bid adapter tests

* Add custom sizes

* Refactor response meta

* mediaimpact adapter fix tests

---------

Co-authored-by: koshe <[email protected]>
  • Loading branch information
nalexand and koshe authored Jun 3, 2024
1 parent 4d1692e commit 74c8644
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions modules/mediaimpactBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ export const spec = {
creativeId: ad.creativeId,
netRevenue: ad.netRevenue,
currency: ad.currency,
winNotification: ad.winNotification
}
winNotification: ad.winNotification,
meta: {}
};

bidObject.meta = {};
if (ad.adomain && ad.adomain.length > 0) {
bidObject.meta.advertiserDomains = ad.adomain;
if (ad.meta) {
bidObject.meta = ad.meta;
}

return bidObject;
Expand Down
18 changes: 9 additions & 9 deletions test/spec/modules/mediaimpactBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ describe('MediaimpactAdapter', function () {
'width': 300,
'height': 250,
'creativeId': '8:123456',
'adomain': [
'test.domain'
],
'meta': {
'advertiserDomains': ['test.domain']
},
'syncs': [
{'type': 'image', 'url': 'https://test.domain/tracker_1.gif'},
{'type': 'image', 'url': 'https://test.domain/tracker_2.gif'},
Expand Down Expand Up @@ -200,9 +200,9 @@ describe('MediaimpactAdapter', function () {
'cpm': 0.01,
'currency': 'USD',
'netRevenue': true,
'adomain': [
'test.domain'
],
'meta': {
'advertiserDomains': ['test.domain']
},
};

it('fill ad for response', function () {
Expand Down Expand Up @@ -263,9 +263,9 @@ describe('MediaimpactAdapter', function () {
'width': 300,
'height': 250,
'creativeId': '8:123456',
'adomain': [
'test.domain'
],
'meta': {
'advertiserDomains': ['test.domain']
},
'syncs': [
{'type': 'image', 'link': 'https://test.domain/tracker_1.gif'},
{'type': 'image', 'link': 'https://test.domain/tracker_2.gif'},
Expand Down

0 comments on commit 74c8644

Please sign in to comment.