chore(core): add mixpanel track (#6202)

This commit is contained in:
Brooooooklyn
2024-03-22 09:24:40 +00:00
parent 10af0ab48d
commit 150c22936d
21 changed files with 229 additions and 67 deletions

View File

@@ -43,5 +43,12 @@ export async function createApp() {
app.useWebSocketAdapter(adapter);
}
if (AFFiNE.isSelfhosted && AFFiNE.telemetry.enabled) {
const mixpanel = await import('mixpanel');
mixpanel.init(AFFiNE.telemetry.token).track('selfhost-server-started', {
version: AFFiNE.version,
});
}
return app;
}