From cccb9c9ba04aeff84629edf5b53461cd7dcb0410 Mon Sep 17 00:00:00 2001 From: francesco Date: Mon, 20 Dec 2021 17:16:09 +0100 Subject: [PATCH] Fix prebid issue #7156 --- modules/onetagBidAdapter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/onetagBidAdapter.js b/modules/onetagBidAdapter.js index c8899070e5e..5642dce9018 100644 --- a/modules/onetagBidAdapter.js +++ b/modules/onetagBidAdapter.js @@ -347,11 +347,13 @@ function getSizes(sizes) { function getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent) { let syncs = []; let params = ''; - if (gdprConsent && typeof gdprConsent.consentString === 'string') { - params += '&gdpr_consent=' + gdprConsent.consentString; + if (gdprConsent) { if (typeof gdprConsent.gdprApplies === 'boolean') { params += '&gdpr=' + (gdprConsent.gdprApplies ? 1 : 0); } + if (typeof gdprConsent.consentString === 'string') { + params += '&gdpr_consent=' + gdprConsent.consentString; + } } if (uspConsent && typeof uspConsent === 'string') { params += '&us_privacy=' + uspConsent;