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

Mediasquare Bid Adapter: add attribute to track #10571

Merged
merged 2 commits into from
Oct 4, 2023
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: 2 additions & 2 deletions modules/mediasquareBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const spec = {
'advertiserDomains': value['adomain']
}
};
let paramsToSearchFor = ['bidder', 'code', 'match', 'hasConsent', 'context', 'increment'];
let paramsToSearchFor = ['bidder', 'code', 'match', 'hasConsent', 'context', 'increment', 'ova'];
paramsToSearchFor.forEach(param => {
if (param in value) {
bidResponse['mediasquare'][param] = value[param];
Expand Down Expand Up @@ -174,7 +174,7 @@ export const spec = {
}
let params = { pbjs: '$prebid.version$', referer: encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation) };
let endpoint = document.location.search.match(/msq_test=true/) ? BIDDER_URL_TEST : BIDDER_URL_PROD;
let paramsToSearchFor = ['bidder', 'code', 'match', 'hasConsent', 'context', 'increment'];
let paramsToSearchFor = ['bidder', 'code', 'match', 'hasConsent', 'context', 'increment', 'ova'];
if (bid.hasOwnProperty('mediasquare')) {
paramsToSearchFor.forEach(param => {
if (bid['mediasquare'].hasOwnProperty(param)) {
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/mediasquareBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ describe('MediaSquare bid adapter tests', function () {
'adomain': ['test.com'],
'context': 'instream',
'increment': 1.0,
'ova': 'cleared',
}],
}};

Expand Down Expand Up @@ -171,6 +172,7 @@ describe('MediaSquare bid adapter tests', function () {
expect(bid.mediasquare.increment).to.exist;
expect(bid.mediasquare.increment).to.equal(1.0);
expect(bid.mediasquare.code).to.equal([DEFAULT_PARAMS[0].params.owner, DEFAULT_PARAMS[0].params.code].join('/'));
expect(bid.mediasquare.ova).to.exist.and.to.equal('cleared');
expect(bid.meta).to.exist;
expect(bid.meta.advertiserDomains).to.exist;
expect(bid.meta.advertiserDomains).to.have.lengthOf(1);
Expand Down Expand Up @@ -213,6 +215,7 @@ describe('MediaSquare bid adapter tests', function () {
let message = JSON.parse(server.requests[0].requestBody);
expect(message).to.have.property('increment').exist;
expect(message).to.have.property('increment').and.to.equal('1');
expect(message).to.have.property('ova').and.to.equal('cleared');
});
it('Verifies user sync without cookie in bid response', function () {
var syncs = spec.getUserSyncs({}, [BID_RESPONSE], DEFAULT_OPTIONS.gdprConsent, DEFAULT_OPTIONS.uspConsent);
Expand Down