Skip to content

Commit 66c4e7b

Browse files
authored
MinuteMedia Bid Adapter: support Coppa param (#25)
1 parent 63bfe48 commit 66c4e7b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

modules/minutemediaBidAdapter.js

+4
Original file line numberDiff line numberDiff line change
@@ -428,5 +428,9 @@ function generateGeneralParams(generalObject, bidderRequest) {
428428
generalParams.page_url = deepAccess(bidderRequest, 'refererInfo.page') || window.location.href
429429
}
430430

431+
if (config.getConfig('coppa') === true) {
432+
generalParams.coppa = 1;
433+
}
434+
431435
return generalParams
432436
}

test/spec/modules/minutemediaBidAdapter_spec.js

+14
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,20 @@ describe('minutemediaAdapter', function () {
293293
expect(request.data.bids[0]).to.be.an('object');
294294
expect(request.data.bids[0]).to.have.property('floorPrice', 1.5);
295295
});
296+
297+
describe('COPPA param', function () {
298+
it('should add COPPA param to payload when COPPA equal to true', function () {
299+
config.setConfig({ coppa: true });
300+
const request = spec.buildRequests(bidRequests, bidderRequest);
301+
expect(request.data.params.coppa).to.equal(1);
302+
});
303+
304+
it('should not add COPPA param to payload when prebid config has parameter COPPA equal to false', function () {
305+
config.setConfig({ coppa: false });
306+
const request = spec.buildRequests(bidRequests, bidderRequest);
307+
expect(request.data.params.coppa).to.be.undefined;
308+
});
309+
})
296310
});
297311

298312
describe('interpretResponse', function () {

0 commit comments

Comments
 (0)