-
Notifications
You must be signed in to change notification settings - Fork 57
feat: map Rokt Privacy flags in cookieSyncManager #1140
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
Conversation
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.
Pull request overview
This PR adds privacy flag support to control Rokt cookie syncing based on user consent preferences. It introduces a new PrivacyManager component that stores noFunctional and noTargeting flags from launcherOptions, and blocks Rokt (moduleId 1277) cookie syncs when noTargeting is true.
Changes:
- Introduced
PrivacyManagerclass to store and manage privacy flags fromlauncherOptions - Modified
CookieSyncManagerto checknoTargetingflag and block Rokt cookie syncs when enabled - Added comprehensive unit tests (Jest) and integration tests for the privacy flag functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/privacyManager.ts | New component that manages privacy flags (noFunctional, noTargeting) with validation and default values |
| src/mp-instance.ts | Initializes PrivacyManager and adds it to the SDK instance interface |
| src/cookieSyncManager.ts | Adds Rokt module ID constant and implements privacy flag check to block Rokt cookie syncs |
| test/jest/privacyManager.spec.ts | Unit tests for PrivacyManager covering initialization, defaults, and flag validation |
| test/jest/cookieSyncManager.spec.ts | Unit tests verifying Rokt cookie sync blocking behavior based on noTargeting flag |
| test/jest/roktManager.spec.ts | Test verifying privacy flags are passed through to RoktManager's launcherOptions |
| test/src/tests-cookie-syncing.ts | Comprehensive integration tests covering edge cases like MPID changes, consent interaction, and multi-partner scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Just reviewed. I feel like having a full privacyManager is over-engineering for the scope of the problem. Lots of set up to just get a formal getter. (90 lines in the class for this). There aren't other use cases for it right now, and if there is a future where we do more with privacy flags maybe this is the right approach, but I also think there would be a larger refactor incorporting the consent framework. Seems like we could simply work with the existing Store.SDKConfig, and do something like: |
…kieConsent, update tests
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
🎉 This PR is included in version 2.53.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |


Background
noTargeting,noFunctionalflag) passed vialauncherOptions. This is a workaround to block Rokt cookie syncs without requiring advertisers to implement the full consent framework.What Has Changed
noFunctionalandnoTargetingflags fromlauncherOptionsRokt(moduleId 1277) cookie sync whennoTargetingistrueScreenshots/Video
Checklist
Additional Notes
Reference Issue (For employees only. Ignore if you are an outside contributor)