Skip to content

Commit

Permalink
Prebid 9.0: fix consent getconfigs (#11592)
Browse files Browse the repository at this point in the history
* Update apstreamBidAdapter.js

* Update madvertiseBidAdapter.js

* Update madvertiseBidAdapter.js

* SirData RTD provider: use textContent instead of innerText (#11595)

Co-authored-by: Demetrio Girardi <[email protected]>

* Update madvertiseBidAdapter_spec.js

---------

Co-authored-by: Demetrio Girardi <[email protected]>
  • Loading branch information
patmmccann and dgirardi authored May 28, 2024
1 parent 5ea9f6e commit 980c68a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions modules/apstreamBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,14 @@ function getConsentStringFromPrebid(gdprConsentConfig) {
return null;
}

let isIab = config.getConfig('consentManagement.cmpApi') != 'static';
let vendorConsents = (
gdprConsentConfig.vendorData.vendorConsents ||
(gdprConsentConfig.vendorData.vendor || {}).consents ||
{}
);
let isConsentGiven = !!vendorConsents[CONSTANTS.GVLID.toString(10)];

return isIab && isConsentGiven ? consentString : null;
return isConsentGiven ? consentString : null;
}

function getIabConsentString(bidderRequest) {
Expand Down
3 changes: 1 addition & 2 deletions modules/madvertiseBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { parseSizesInput, _each } from '../src/utils.js';
import {config} from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

/**
Expand Down Expand Up @@ -55,7 +54,7 @@ export const spec = {
}

if (bidderRequest && bidderRequest.gdprConsent) {
src = src + '&gdpr=' + (bidderRequest.gdprConsent.gdprApplies ? '1' : '0') + '&consent[0][format]=' + config.getConfig('consentManagement.cmpApi') + '&consent[0][value]=' + bidderRequest.gdprConsent.consentString;
src = src + '&gdpr=' + (bidderRequest.gdprConsent.gdprApplies ? '1' : '0') + '&consent[0][format]=iab&consent[0][value]=' + bidderRequest.gdprConsent.consentString;
}

return {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/madvertiseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('madvertise adapater', () => {
expect(req[0].url).to.contain(`&zoneId=test`);
expect(req[0].url).to.contain(`&sizes[0]=728x90`);
expect(req[0].url).to.contain(`&gdpr=1`);
expect(req[0].url).to.contain(`&consent[0][format]=IAB`);
expect(req[0].url).to.contain(`&consent[0][format]=iab`);
expect(req[0].url).to.contain(`&consent[0][value]=CO_5mtSPHOmEIAsAkBFRBOCsAP_AAH_AAAqIHQgB7SrERyNAYWB5gusAKYlfQAQCA2AABAYdASgJQQBAMJYEkGAIuAnAACAKAAAEIHQAAAAlCCmABAEAAIABBSGMAQgABZAAIiAEEAATAABACAABGYCSCAIQjIAAAAEAgEKEAAoAQGBAAAEgBABAAAogACADAgXmACIKkQBAkBAYAkAYQAogAhAAAAAIAAAAAAAKAABAAAghAAQQAAAAAAAAAgAAAAABAAAAAAAAQAAAAAAAAABAAgAAAAAAAAAIAAAAAAAAAAAAAAAABAAAAAAAAAAAQCAKCgBgEQALgAqkJADAIgAXABVIaACAAERABAACKgAgABA`)
});

Expand Down

0 comments on commit 980c68a

Please sign in to comment.