mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44: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,
|
||||
userId: this.currentUserId,
|
||||
store: this.$store,
|
||||
versionCli: this.$store.getters['settings/versionCli'],
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
@ -48,10 +48,11 @@ export class Telemetry {
|
|||
|
||||
init(
|
||||
telemetrySettings: ITelemetrySettings,
|
||||
{ instanceId, userId, store }: {
|
||||
{ instanceId, userId, store, versionCli }: {
|
||||
instanceId: string;
|
||||
userId?: string;
|
||||
store: Store<IRootState>;
|
||||
versionCli: string
|
||||
},
|
||||
) {
|
||||
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.track('Session started', { session_id: store.getters.sessionId });
|
||||
}
|
||||
|
||||
identify(instanceId: string, userId?: string) {
|
||||
const traits = { instance_id: instanceId };
|
||||
identify(instanceId: string, userId?: string, versionCli?: string) {
|
||||
const traits = { instance_id: instanceId, version_cli: versionCli };
|
||||
if (userId) {
|
||||
this.rudderStack.identify(`${instanceId}#${userId}`, traits);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue