chore: improve event flow (#14266)

This commit is contained in:
DarkSky
2026-01-16 16:07:27 +08:00
committed by GitHub
parent d4581b839a
commit 924d58603f
43 changed files with 2306 additions and 567 deletions
@@ -1,4 +1,4 @@
import { ga4, sentry, tracker } from '@affine/track';
import { sentry, tracker } from '@affine/track';
import { APP_SETTINGS_STORAGE_KEY } from '@toeverything/infra/atom';
tracker.init();
@@ -14,10 +14,8 @@ if (typeof localStorage !== 'undefined') {
}
if (!enabled) {
// 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();
// NOTE: telemetry setting is respected by tracker and sentry.
sentry.disable();
ga4.setEnabled(false);
tracker.opt_out_tracking();
}
}