chore(core): fix mixpanel init (#12513)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Bug Fixes**
  - Adjusted telemetry settings to ensure Sentry is disabled when telemetry is enabled and clarified Mixpanel’s automatic opt-out behavior.

- **Documentation**
  - Added a comment explaining Mixpanel’s handling of telemetry preferences for improved transparency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
forehalo
2025-05-26 06:28:32 +00:00
parent 8ba4584b88
commit 25aa5701bd

View File

@@ -14,7 +14,9 @@ if (typeof localStorage !== 'undefined') {
}
if (!enabled) {
mixpanel.opt_out_tracking();
// NOTE(@forehalo): mixpanel will read local storage flag and doesn't need to be manually opt_out at startup time.
// see: https://docs.mixpanel.com/docs/privacy/protecting-user-data
// mixpanel.opt_out_tracking();
sentry.disable();
}
}