Skip to content

🐞 fix(consent): Fix consent-aware event gating across SDK runtimes#325

Open
Charles Hudson (phobetron) wants to merge 1 commit into
mainfrom
NT-3519_correct-consent-gating-behavior
Open

🐞 fix(consent): Fix consent-aware event gating across SDK runtimes#325
Charles Hudson (phobetron) wants to merge 1 commit into
mainfrom
NT-3519_correct-consent-gating-behavior

Conversation

@phobetron

@phobetron Charles Hudson (phobetron) commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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]

## 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)]
@phobetron Charles Hudson (phobetron) force-pushed the NT-3519_correct-consent-gating-behavior branch from 98442ba to 19f41d5 Compare June 20, 2026 15:12
@wiz-inc-38d59fb8d7

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 3 Low
Software Management Finding Software Management Findings -
Total 3 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant