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

IX Bid Adapter: update additional consent field #9650

Merged
merged 2 commits into from
Mar 13, 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
2 changes: 1 addition & 1 deletion modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ function applyRegulations(r, bidderRequest) {

if (gdprConsent.hasOwnProperty('addtlConsent') && gdprConsent.addtlConsent) {
r.user.ext.consented_providers_settings = {
consented_providers: gdprConsent.addtlConsent
addtl_consent: gdprConsent.addtlConsent
};
}
}
Expand Down
8 changes: 4 additions & 4 deletions test/spec/modules/ixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3469,7 +3469,7 @@ describe('IndexexchangeAdapter', function () {
expect(requestWithConsent.regs.ext.us_privacy).to.equal('1YYN');
});

it('should contain `consented_providers_settings.consented_providers` & consent on user.ext when both are provided', function () {
it('should contain `consented_providers_settings.addtl_consent` & consent on user.ext when both are provided', function () {
const options = {
gdprConsent: {
consentString: '3huaa11=qu3198ae',
Expand All @@ -3479,11 +3479,11 @@ describe('IndexexchangeAdapter', function () {

const validBidWithConsent = spec.buildRequests(DEFAULT_BANNER_VALID_BID, options);
const requestWithConsent = extractPayload(validBidWithConsent[0]);
expect(requestWithConsent.user.ext.consented_providers_settings.consented_providers).to.equal('1~1.35.41.101');
expect(requestWithConsent.user.ext.consented_providers_settings.addtl_consent).to.equal('1~1.35.41.101');
expect(requestWithConsent.user.ext.consent).to.equal('3huaa11=qu3198ae');
});

it('should not contain `consented_providers_settings.consented_providers` on user.ext when consent is not provided', function () {
it('should not contain `consented_providers_settings.addtl_consent` on user.ext when consent is not provided', function () {
const options = {
gdprConsent: {
addtlConsent: '1~1.35.41.101',
Expand All @@ -3492,7 +3492,7 @@ describe('IndexexchangeAdapter', function () {

const validBidWithConsent = spec.buildRequests(DEFAULT_BANNER_VALID_BID, options);
const requestWithConsent = extractPayload(validBidWithConsent[0]);
expect(utils.deepAccess(requestWithConsent, 'user.ext.consented_providers_settings')).to.not.exist;
expect(utils.deepAccess(requestWithConsent, 'user.ext.consented_providers_settings.addtl_consent')).to.not.exist;
expect(utils.deepAccess(requestWithConsent, 'user.ext.consent')).to.not.exist;
});

Expand Down