Skip to content

Commit 9d7c79b

Browse files
saar120uditaliasshmoop207
authored
Vidazoo Bid Adapter: pass gpp to user sync (#10274)
* feat(module): multi size request * fix getUserSyncs added tests * update(module): package-lock.json from master * feat(module): VidazooBidAdapter - send top query params to server * multi poc * feat: added support for single request. * feat: change to bids. * change to if else * Fixed test * feat(client): added gpp to userSync --------- Co-authored-by: Udi Talias <[email protected]> Co-authored-by: roman <[email protected]>
1 parent c281fc7 commit 9d7c79b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules/vidazooBidAdapter.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,20 @@ function interpretResponse(serverResponse, request) {
320320
}
321321
}
322322

323-
function getUserSyncs(syncOptions, responses, gdprConsent = {}, uspConsent = '') {
323+
function getUserSyncs(syncOptions, responses, gdprConsent = {}, uspConsent = '', gppConsent = {}) {
324324
let syncs = [];
325325
const {iframeEnabled, pixelEnabled} = syncOptions;
326326
const {gdprApplies, consentString = ''} = gdprConsent;
327+
const {gppString, applicableSections} = gppConsent;
327328

328329
const cidArr = responses.filter(resp => deepAccess(resp, 'body.cid')).map(resp => resp.body.cid).filter(uniques);
329-
const params = `?cid=${encodeURIComponent(cidArr.join(','))}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${encodeURIComponent(consentString || '')}&us_privacy=${encodeURIComponent(uspConsent || '')}`
330+
let params = `?cid=${encodeURIComponent(cidArr.join(','))}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${encodeURIComponent(consentString || '')}&us_privacy=${encodeURIComponent(uspConsent || '')}`;
331+
332+
if (gppString && applicableSections?.length) {
333+
params += '&gpp=' + encodeURIComponent(gppString);
334+
params += '&gpp_sid=' + encodeURIComponent(applicableSections.join(','));
335+
}
336+
330337
if (iframeEnabled) {
331338
syncs.push({
332339
type: 'iframe',

0 commit comments

Comments
 (0)