From 3d9a7b1a1d272cdc3f4fa23d66ab33c4df914a72 Mon Sep 17 00:00:00 2001 From: Rich Audience Date: Wed, 1 Dec 2021 16:53:44 +0100 Subject: [PATCH] Update for 'Adapters that may not handle GDPR-Applies correctly #7775' (#7788) Co-authored-by: sgimenez --- modules/richaudienceBidAdapter.js | 3 +-- test/spec/modules/richaudienceBidAdapter_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/richaudienceBidAdapter.js b/modules/richaudienceBidAdapter.js index 09bd0a4e72e..645442cac95 100755 --- a/modules/richaudienceBidAdapter.js +++ b/modules/richaudienceBidAdapter.js @@ -58,11 +58,10 @@ export const spec = { REFERER = (typeof bidderRequest.refererInfo.referer != 'undefined' ? encodeURIComponent(bidderRequest.refererInfo.referer) : null) payload.gdpr_consent = ''; - payload.gdpr = null; + payload.gdpr = bidderRequest.gdprConsent.gdprApplies; if (bidderRequest && bidderRequest.gdprConsent) { payload.gdpr_consent = bidderRequest.gdprConsent.consentString; - payload.gdpr = bidderRequest.gdprConsent.gdprApplies; } var payloadString = JSON.stringify(payload); diff --git a/test/spec/modules/richaudienceBidAdapter_spec.js b/test/spec/modules/richaudienceBidAdapter_spec.js index 00ae55823b0..42f4ef6489d 100644 --- a/test/spec/modules/richaudienceBidAdapter_spec.js +++ b/test/spec/modules/richaudienceBidAdapter_spec.js @@ -905,7 +905,7 @@ describe('Richaudience adapter tests', function () { }, [], { consentString: null, referer: 'http://domain.com', - gdprApplies: true + gdprApplies: false }) expect(syncs).to.have.lengthOf(1); expect(syncs[0].type).to.equal('image'); @@ -942,7 +942,7 @@ describe('Richaudience adapter tests', function () { }, [], { consentString: null, referer: 'http://domain.com', - gdprApplies: true + gdprApplies: false }) expect(syncs).to.have.lengthOf(0); });