Skip to content

Commit

Permalink
Richaudience Bid Adapter: uncaught error on non-gdpr locations #7955 (#…
Browse files Browse the repository at this point in the history
…7962)

Co-authored-by: sgimenez <sergi.gimenez@richaudience.com>
  • Loading branch information
richaudience and richaudience authored Jan 24, 2022
1 parent abeb35f commit 8b7d49e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/richaudienceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ export const spec = {
REFERER = (typeof bidderRequest.refererInfo.referer != 'undefined' ? encodeURIComponent(bidderRequest.refererInfo.referer) : null)

payload.gdpr_consent = '';
payload.gdpr = bidderRequest.gdprConsent.gdprApplies;
payload.gdpr = false;

if (bidderRequest && bidderRequest.gdprConsent) {
payload.gdpr_consent = bidderRequest.gdprConsent.consentString;
if (typeof bidderRequest.gdprConsent.gdprApplies != 'undefined') {
payload.gdpr = bidderRequest.gdprConsent.gdprApplies;
}
if (typeof bidderRequest.gdprConsent.consentString != 'undefined') {
payload.gdpr_consent = bidderRequest.gdprConsent.consentString;
}
}

var payloadString = JSON.stringify(payload);
Expand Down

0 comments on commit 8b7d49e

Please sign in to comment.