Skip to content

Commit

Permalink
Fix prebid issue prebid#7156
Browse files Browse the repository at this point in the history
  • Loading branch information
forazini committed Dec 20, 2021
1 parent ca76b67 commit cccb9c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/onetagBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cccb9c9

Please sign in to comment.