-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Mediago Bid Adapter : add cookieSync and gdpr #10724
Conversation
# Conflicts: # modules/mediagoBidAdapter.js
modules/mediagoBidAdapter.js
Outdated
@@ -415,6 +428,26 @@ export const spec = { | |||
return bidResponses; | |||
}, | |||
|
|||
getUserSyncs: function (syncOptions, serverResponse, gdprConsent, uspConsent, gppConsent) { | |||
const origin = encodeURIComponent(location.origin || `https://${location.host}`); | |||
const url = `${COOKY_SYNC_URL}?dm=${origin}&gdpr_consent=${gdprConsent.consentString}`; |
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.
When running this in simple testing, I'm getting this error.
mediagoBidAdapter.js:433 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'consentString')
at Object.getUserSyncs (mediagoBidAdapter.js:433:76)
at bidderFactory.js:512:22
at registerSyncs (bidderFactory.js:347:5)
at bidderFactory.js:265:11
at Object.runWithBidder (config.js:508:14)
at afterAllResponses (bidderFactory.js:263:9)
at perfMetrics.js:288:17
at utils.js:661:12
at bidderFactory.js:448:7
at runWithBidder (config.js:508:14)
I'm not setting up any of the gdpr things for this test, just a simple test in hello_world.html. I would assume you want this to function to work in this situation as well. I think you should be checking if these variables are set in this function. You can see the various ways people are checking for this in other adapters.
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.
Thank you for reminding, i have fixed error.
Type of change
Bugfix
Feature
New bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Other information