-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CCPA query param #3
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,10 @@ export const tripleliftAdapterSpec = { | |
} | ||
} | ||
|
||
if (bidderRequest && bidderRequest.uspConsent) { | ||
tlCall = utils.tryAppendQueryString(tlCall, 'us_privacy', bidderRequest.uspConsent); | ||
} | ||
|
||
if (tlCall.lastIndexOf('&') === tlCall.length - 1) { | ||
tlCall = tlCall.substring(0, tlCall.length - 1); | ||
} | ||
|
@@ -62,7 +66,7 @@ export const tripleliftAdapterSpec = { | |
}); | ||
}, | ||
|
||
getUserSyncs: function(syncOptions) { | ||
getUserSyncs: function(syncOptions, responses, gdprConsent, usPrivacy) { | ||
let syncType = _getSyncType(syncOptions); | ||
if (!syncType) return; | ||
|
||
|
@@ -78,6 +82,10 @@ export const tripleliftAdapterSpec = { | |
syncEndpoint = utils.tryAppendQueryString(syncEndpoint, 'cmp_cs', consentString); | ||
} | ||
|
||
if (typeof usPrivacy === 'string' && usPrivacy.length > 0) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you have an example value for this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's very confusing, but they appear to be just passing along the string value from the |
||
syncEndpoint = utils.tryAppendQueryString(syncEndpoint, 'us_privacy', usPrivacy); | ||
} | ||
|
||
return [{ | ||
type: syncType, | ||
url: syncEndpoint | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking - I don't like how we repeat
bidderRequest &&
so much in this file. maybe group all these if's under a singleif (bidderRequest) { ... }
or initialize a default value forbidderRequest
if it doesn't exist. I see some other adapters in this repo using es6 so it might be simple to set a default.