diff --git a/modules/id5IdSystem.js b/modules/id5IdSystem.js index a1596e96fcd..7033a71d015 100644 --- a/modules/id5IdSystem.js +++ b/modules/id5IdSystem.js @@ -78,13 +78,13 @@ export const id5IdSubmodule = { return undefined; } + const url = `https://id5-sync.com/g/v2/${config.params.partner}.json`; const hasGdpr = (consentData && typeof consentData.gdprApplies === 'boolean' && consentData.gdprApplies) ? 1 : 0; - const gdprConsentString = hasGdpr ? consentData.consentString : ''; - const usp = uspDataHandler.getConsentData() || ''; - const url = `https://id5-sync.com/g/v2/${config.params.partner}.json?gdpr_consent=${gdprConsentString}&gdpr=${hasGdpr}&us_privacy=${usp}`; const referer = getRefererInfo(); const signature = (cacheIdObj && cacheIdObj.signature) ? cacheIdObj.signature : getLegacyCookieSignature(); const data = { + 'gdpr': hasGdpr, + 'gdpr_consent': hasGdpr ? consentData.consentString : '', 'partner': config.params.partner, 'nbPage': incrementNb(config.params.partner), 'o': 'pbjs', @@ -94,6 +94,7 @@ export const id5IdSubmodule = { 's': signature, 'top': referer.reachedTop ? 1 : 0, 'u': referer.stack[0] || window.location.href, + 'us_privacy': uspDataHandler.getConsentData() || '', 'v': '$prebid.version$' }; diff --git a/test/spec/modules/id5IdSystem_spec.js b/test/spec/modules/id5IdSystem_spec.js index adffca6dbe5..845cf7fa010 100644 --- a/test/spec/modules/id5IdSystem_spec.js +++ b/test/spec/modules/id5IdSystem_spec.js @@ -143,6 +143,9 @@ describe('ID5 ID System', function() { expect(requestBody.s).to.eq(''); expect(requestBody.provider).to.eq(''); expect(requestBody.v).to.eq('$prebid.version$'); + expect(requestBody.gdpr).to.exist; + expect(requestBody.gdpr_consent).to.exist + expect(requestBody.us_privacy).to.exist; request.respond(200, responseHeader, JSON.stringify(ID5_JSON_RESPONSE)); expect(callbackSpy.calledOnce).to.be.true;