fix: Fixes PostHog group identify call site after init (#30794)

This commit is contained in:
Joco-95 2026-05-20 12:20:12 +02:00 committed by GitHub
parent 06e78f39be
commit ba35fc81c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -64,16 +64,11 @@ export class Telemetry {
});
this.identify({ instanceId, userId, versionCli, projectId, userRole });
this.groupIdentify({ instanceId });
this.flushPageEvents();
this.track('Session started', { session_id: rootStore.pushRef });
}
groupIdentify({ instanceId }: { instanceId: string }) {
usePostHog()?.groupIdentify?.('company', instanceId);
}
identify({ instanceId, userId, versionCli, projectId, userRole }: TelemetryIdentifyOptions) {
const settingsStore = useSettingsStore();
const traits: {

View File

@ -187,6 +187,7 @@ export const usePostHog = defineStore('posthog', () => {
window.posthog?.init(config.apiKey, options);
identify();
groupIdentify('company', instanceId);
if (evaluatedFeatureFlags && Object.keys(evaluatedFeatureFlags).length) {
featureFlags.value = evaluatedFeatureFlags;