mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 13:14:07 -08:00
⚡ Add versionCli
This commit is contained in:
parent
9eba337d93
commit
592ecb3742
|
@ -43,6 +43,7 @@ export default mixins(externalHooks).extend({
|
||||||
instanceId: this.instanceId,
|
instanceId: this.instanceId,
|
||||||
userId: this.currentUserId,
|
userId: this.currentUserId,
|
||||||
store: this.$store,
|
store: this.$store,
|
||||||
|
versionCli: this.$store.getters['settings/versionCli'],
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,11 @@ export class Telemetry {
|
||||||
|
|
||||||
init(
|
init(
|
||||||
telemetrySettings: ITelemetrySettings,
|
telemetrySettings: ITelemetrySettings,
|
||||||
{ instanceId, userId, store }: {
|
{ instanceId, userId, store, versionCli }: {
|
||||||
instanceId: string;
|
instanceId: string;
|
||||||
userId?: string;
|
userId?: string;
|
||||||
store: Store<IRootState>;
|
store: Store<IRootState>;
|
||||||
|
versionCli: string
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
if (!telemetrySettings.enabled || !telemetrySettings.config || this.rudderStack) return;
|
if (!telemetrySettings.enabled || !telemetrySettings.config || this.rudderStack) return;
|
||||||
|
@ -74,14 +75,14 @@ export class Telemetry {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
this.identify(instanceId, userId);
|
this.identify(instanceId, userId, versionCli);
|
||||||
|
|
||||||
this.flushPageEvents();
|
this.flushPageEvents();
|
||||||
this.track('Session started', { session_id: store.getters.sessionId });
|
this.track('Session started', { session_id: store.getters.sessionId });
|
||||||
}
|
}
|
||||||
|
|
||||||
identify(instanceId: string, userId?: string) {
|
identify(instanceId: string, userId?: string, versionCli?: string) {
|
||||||
const traits = { instance_id: instanceId };
|
const traits = { instance_id: instanceId, version_cli: versionCli };
|
||||||
if (userId) {
|
if (userId) {
|
||||||
this.rudderStack.identify(`${instanceId}#${userId}`, traits);
|
this.rudderStack.identify(`${instanceId}#${userId}`, traits);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue