From 25aa5701bdc837f5a6ac97a9a52fba1616fc5aeb Mon Sep 17 00:00:00 2001 From: forehalo Date: Mon, 26 May 2025 06:28:32 +0000 Subject: [PATCH] chore(core): fix mixpanel init (#12513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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. --- packages/frontend/core/src/bootstrap/telemetry.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/frontend/core/src/bootstrap/telemetry.ts b/packages/frontend/core/src/bootstrap/telemetry.ts index e9950d3b7..f32182f9a 100644 --- a/packages/frontend/core/src/bootstrap/telemetry.ts +++ b/packages/frontend/core/src/bootstrap/telemetry.ts @@ -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(); } }