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

CointrafficBidAdapter: add meta.advertiserDomains and meta.mediaType to bid response #6875

Merged
merged 1 commit into from
May 29, 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
6 changes: 5 additions & 1 deletion modules/cointrafficBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ export const spec = {
height: response.height,
creativeId: response.creativeId,
ttl: response.ttl,
ad: response.ad
ad: response.ad,
meta: {
advertiserDomains: response.adomain && response.adomain.length ? response.adomain : [],
mediaType: response.mediaType
}
};

bidResponses.push(bidResponse);
Expand Down
24 changes: 20 additions & 4 deletions test/spec/modules/cointrafficBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ describe('cointrafficBidAdapter', function () {
height: 250,
creativeId: 'creativeId12345',
ttl: 90,
ad: '<html><h3>I am an ad</h3></html> '
ad: '<html><h3>I am an ad</h3></html> ',
mediaType: 'banner',
adomain: ['test.com']
}
};

Expand All @@ -155,7 +157,13 @@ describe('cointrafficBidAdapter', function () {
height: 250,
creativeId: 'creativeId12345',
ttl: 90,
ad: '<html><h3>I am an ad</h3></html>'
ad: '<html><h3>I am an ad</h3></html>',
meta: {
mediaType: 'banner',
advertiserDomains: [
'test.com',
]
}
}];

let result = spec.interpretResponse(serverResponse, bidRequest[0]);
Expand Down Expand Up @@ -186,7 +194,9 @@ describe('cointrafficBidAdapter', function () {
height: 250,
creativeId: 'creativeId12345',
ttl: 90,
ad: '<html><h3>I am an ad</h3></html> '
ad: '<html><h3>I am an ad</h3></html> ',
mediaType: 'banner',
adomain: ['test.com']
}
};

Expand All @@ -199,7 +209,13 @@ describe('cointrafficBidAdapter', function () {
height: 250,
creativeId: 'creativeId12345',
ttl: 90,
ad: '<html><h3>I am an ad</h3></html>'
ad: '<html><h3>I am an ad</h3></html>',
meta: {
mediaType: 'banner',
advertiserDomains: [
'test.com',
]
}
}];

const getConfigStub = sinon.stub(config, 'getConfig').returns('USD');
Expand Down