mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 00:37:10 +02:00
fix: Fixes PostHog group identify call site after init (#30794)
This commit is contained in:
parent
06e78f39be
commit
ba35fc81c3
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user