Skip to content

Commit

Permalink
Mediasquare Bid Adapter: add attribute to track (#10571)
Browse files Browse the repository at this point in the history
* forward ova attribute

* remove unexpected trailing space
  • Loading branch information
matthieularere-msq authored Oct 4, 2023
1 parent 5cb4bcb commit fd8af62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit fd8af62

Please sign in to comment.