diff --git a/modules/tripleliftBidAdapter.js b/modules/tripleliftBidAdapter.js index 45931bce27e..df00495b88b 100644 --- a/modules/tripleliftBidAdapter.js +++ b/modules/tripleliftBidAdapter.js @@ -9,7 +9,7 @@ const BIDDER_CODE = 'triplelift'; const STR_ENDPOINT = 'https://tlx.3lift.com/header/auction?'; const BANNER_TIME_TO_LIVE = 300; const VIDEO_TIME_TO_LIVE = 3600; -let gdprApplies = true; +let gdprApplies = null; let consentString = null; export const storage = getStorageManager({bidderCode: BIDDER_CODE}); @@ -40,8 +40,12 @@ export const tripleliftAdapterSpec = { if (bidderRequest && bidderRequest.gdprConsent) { if (typeof bidderRequest.gdprConsent.gdprApplies !== 'undefined') { gdprApplies = bidderRequest.gdprConsent.gdprApplies; - tlCall = tryAppendQueryString(tlCall, 'gdpr', gdprApplies.toString()); + } else { + gdprApplies = true; } + + tlCall = tryAppendQueryString(tlCall, 'gdpr', gdprApplies.toString()); + if (typeof bidderRequest.gdprConsent.consentString !== 'undefined') { consentString = bidderRequest.gdprConsent.consentString; tlCall = tryAppendQueryString(tlCall, 'cmp_cs', consentString); @@ -87,7 +91,7 @@ export const tripleliftAdapterSpec = { syncEndpoint = tryAppendQueryString(syncEndpoint, 'src', 'prebid'); } - if (consentString !== null) { + if (consentString !== null || gdprApplies) { syncEndpoint = tryAppendQueryString(syncEndpoint, 'gdpr', gdprApplies); syncEndpoint = tryAppendQueryString(syncEndpoint, 'cmp_cs', consentString); }