🐞 fix(consent): Fix consent-aware event gating across SDK runtimes#325
Open
Charles Hudson (phobetron) wants to merge 1 commit into
Open
🐞 fix(consent): Fix consent-aware event gating across SDK runtimes#325Charles Hudson (phobetron) wants to merge 1 commit into
Charles Hudson (phobetron) wants to merge 1 commit into
Conversation
a305d00 to
98442ba
Compare
## Summary Fixes consent-aware event gating across the Optimization SDK suite so blocked tracking attempts are no longer treated as successfully emitted events. This updates Core, Web, React Web, React Native, Android, and iOS runtimes to distinguish consent-blocked events from accepted queued events and to emit fresh current-state tracking only when the underlying page, screen, or flag value is still current after consent becomes available. ## What changed - Added emission-result plumbing for page and screen tracking so SDK wrappers only dedupe accepted events. - Introduced SDK support helpers for accepted current-state tracking across shared runtimes. - Added support for allowing `flag` events independently from broader component or entry-view tracking. - Fixed flag-view deduping across consent state, profile availability, profile changes, pending sends, and deep-equal flag values. - Gated automatic page, screen, entry view, hover, click/tap, and viewport tracking on consent across Web, React Web, React Native, Android, and iOS. - Added native bridge support for `hasConsent`, `screenWithEmissionResult`, and configurable `allowedEventTypes`. - Updated documentation for consent behavior and core state management. - Updated bundle-size budgets and package metadata for the new SDK support entrypoints. ## Test coverage Adds or updates coverage for: - Core stateful/stateless consent behavior - Core accepted current-state tracking - Web entry interaction runtime and current page tracking - React Web auto-page emission - React Native navigation, screen, tap, and viewport tracking - Android screen/view tracking and config serialization - iOS config and view tracking behavior - E2E flag and entry-view tracking scenarios [[NT-3519](https://contentful.atlassian.net/browse/NT-3519)]
98442ba to
19f41d5
Compare
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes consent-aware event gating across the Optimization SDK suite so blocked tracking attempts are no longer treated as successfully emitted events. This updates Core, Web, React Web, React Native, Android, and iOS runtimes to distinguish consent-blocked events from accepted queued events and to emit fresh current-state tracking only when the underlying page, screen, or flag value is still current after consent becomes available.
What changed
flagevents independently from broader component or entry-view tracking.hasConsent,screenWithEmissionResult, and configurableallowedEventTypes.Test coverage
Adds or updates coverage for:
[NT-3519]