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

GDPR support #2602

Merged
merged 1 commit into from
May 23, 2018
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: 4 additions & 0 deletions modules/sekindoUMBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export const spec = {
queryString = utils.tryAppendQueryString(queryString, 'protocol', protocol);
queryString = utils.tryAppendQueryString(queryString, 'x', bidRequest.params.width);
queryString = utils.tryAppendQueryString(queryString, 'y', bidRequest.params.height);
if (bidderRequest && bidderRequest.gdprConsent) {
queryString = utils.tryAppendQueryString(queryString, 'gdprConsentString', bidderRequest.gdprConsent.consentString);
queryString = utils.tryAppendQueryString(queryString, 'gdprApplies', (bidderRequest.gdprConsent.gdprApplies) ? '1' : '0');
}
if (bidRequest.mediaType === 'video' || (typeof bidRequest.mediaTypes == 'object' && typeof bidRequest.mediaTypes.video == 'object')) {
queryString = utils.tryAppendQueryString(queryString, 'x', bidRequest.params.playerWidth);
queryString = utils.tryAppendQueryString(queryString, 'y', bidRequest.params.playerHeight);
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/sekindoUMBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ describe('sekindoUMAdapter', () => {
expect(request[0].method).to.equal('GET');
});

it('with gdprConsent, banner data should be a query string and method = GET', () => {
bidRequests.mediaType = 'banner';
bidRequests.params = bannerParams;
const request = spec.buildRequests([bidRequests], {'gdprConsent': {'consentString': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==', 'vendorData': {}, 'gdprApplies': true}});
expect(request[0].data).to.be.a('string');
expect(request[0].method).to.equal('GET');
});

it('video data should be a query string and method = GET', () => {
bidRequests.mediaType = 'video';
bidRequests.params = videoParams;
Expand Down