Skip to content

Commit

Permalink
Fix GDPR consent choice capture (prebid#7779)
Browse files Browse the repository at this point in the history
  • Loading branch information
samueldobbie authored and Chris Pabst committed Jan 10, 2022
1 parent ae2323e commit 3514edd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions modules/glimpseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,16 @@ function getReferer(bidderRequest) {
function getGdprConsentChoice(bidderRequest) {
const hasGdprConsent =
hasValue(bidderRequest) &&
hasValue(bidderRequest.gdprConsent) &&
hasStringValue(bidderRequest.gdprConsent.consentString)
hasValue(bidderRequest.gdprConsent)

if (hasGdprConsent) {
return bidderRequest.gdprConsent
const gdprConsent = bidderRequest.gdprConsent

return {
consentString: gdprConsent.consentString || '',
vendorData: gdprConsent.vendorData || {},
gdprApplies: gdprConsent.gdprApplies || true,
}
}

return {
Expand Down

0 comments on commit 3514edd

Please sign in to comment.