diff --git a/modules/kargoBidAdapter.js b/modules/kargoBidAdapter.js index 1909112d36d..254a124be3e 100644 --- a/modules/kargoBidAdapter.js +++ b/modules/kargoBidAdapter.js @@ -268,7 +268,7 @@ function getUserSyncs(syncOptions, _, gdprConsent, usPrivacy, gppConsent) { var gdpr = (gdprConsent && gdprConsent.gdprApplies) ? 1 : 0; var gdprConsentString = (gdprConsent && gdprConsent.consentString) ? gdprConsent.consentString : ''; - var gppString = (gppConsent && gppConsent.consentString) ? gppConsent.consentString : ''; + var gppString = (gppConsent && gppConsent.gppString) ? gppConsent.gppString : ''; var gppApplicableSections = (gppConsent && gppConsent.applicableSections && Array.isArray(gppConsent.applicableSections)) ? gppConsent.applicableSections.join(',') : ''; // don't sync if opted out via usPrivacy @@ -413,8 +413,8 @@ function getUserIds(tdidAdapter, usp, gdpr, eids, gpp) { // GPP if (gpp) { const parsedGPP = {}; - if (gpp.consentString) { - parsedGPP.gppString = gpp.consentString; + if (gpp.gppString) { + parsedGPP.gppString = gpp.gppString; } if (gpp.applicableSections) { parsedGPP.applicableSections = gpp.applicableSections; diff --git a/test/spec/modules/kargoBidAdapter_spec.js b/test/spec/modules/kargoBidAdapter_spec.js index c376b444246..8bc2be1795a 100644 --- a/test/spec/modules/kargoBidAdapter_spec.js +++ b/test/spec/modules/kargoBidAdapter_spec.js @@ -1253,7 +1253,7 @@ describe('kargo adapter tests', function() { it('fetches gpp from the bidder request if present', function() { bidderRequest.gppConsent = { - consentString: 'gppString', + gppString: 'gppString', applicableSections: [-1] }; const payload = getPayloadFromTestBids([{ ...minimumBidParams }]); @@ -1266,7 +1266,7 @@ describe('kargo adapter tests', function() { it('does not send empty gpp values', function() { bidderRequest.gppConsent = { - consentString: '', + gppString: '', applicableSections: '' }; const payload = getPayloadFromTestBids([{ ...minimumBidParams }]); @@ -2045,13 +2045,13 @@ describe('kargo adapter tests', function() { it('includes gpp information if provided', function() { [ - { applicableSections: [-1], consentString: 'test-consent-string', as: '-1', cs: 'test-consent-string' }, - { applicableSections: [1, 2, 3], consentString: 'test-consent-string', as: '1,2,3', cs: 'test-consent-string' }, + { applicableSections: [-1], gppString: 'test-consent-string', as: '-1', cs: 'test-consent-string' }, + { applicableSections: [1, 2, 3], gppString: 'test-consent-string', as: '1,2,3', cs: 'test-consent-string' }, { applicableSections: [-1], as: '-1', cs: '' }, - { applicableSections: false, consentString: 'test-consent-string', as: '', cs: 'test-consent-string' }, - { applicableSections: null, consentString: 'test-consent-string', as: '', cs: 'test-consent-string' }, - { applicableSections: {}, consentString: 'test-consent-string', as: '', cs: 'test-consent-string' }, - { applicableSections: [], consentString: 'test-consent-string', as: '', cs: 'test-consent-string' }, + { applicableSections: false, gppString: 'test-consent-string', as: '', cs: 'test-consent-string' }, + { applicableSections: null, gppString: 'test-consent-string', as: '', cs: 'test-consent-string' }, + { applicableSections: {}, gppString: 'test-consent-string', as: '', cs: 'test-consent-string' }, + { applicableSections: [], gppString: 'test-consent-string', as: '', cs: 'test-consent-string' }, { as: '', cs: '' }, ].forEach(value => expect(getUserSyncs(undefined, undefined, value), `Value - ${value}`) .to.deep.equal(buildSyncUrls(baseUrl @@ -2077,7 +2077,7 @@ describe('kargo adapter tests', function() { expect(getUserSyncs( { gdprApplies: true, consentString: 'test-gdpr-consent' }, '1---', - { applicableSections: [1, 2, 3], consentString: 'test-gpp-consent' } + { applicableSections: [1, 2, 3], gppString: 'test-gpp-consent' } )).to.deep.equal(buildSyncUrls(baseUrl .replace(/gdpr=\d/, 'gdpr=1') .replace(/gdpr_consent=/, 'gdpr_consent=test-gdpr-consent')