Skip to content
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

Merged
merged 57 commits into from
Dec 7, 2023
Merged

Conversation

BaronJHYu
Copy link
Contributor

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

@patmmccann patmmccann changed the title feat: 1. add cookieSync 2. add gdpr Mediago Bid Adapter: feat: 1. add cookieSync 2. add gdpr Nov 14, 2023
@ChrisHuie ChrisHuie changed the title Mediago Bid Adapter: feat: 1. add cookieSync 2. add gdpr Mediago Bid Adapter : add cookieSync and gdpr Nov 21, 2023
@@ -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}`;
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@ChrisHuie ChrisHuie merged commit d0747e4 into prebid:master Dec 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants