mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🔥 Remove identify
from BE
This commit is contained in:
parent
e565b87cf8
commit
9eba337d93
|
@ -48,7 +48,6 @@ export class InternalHooksClass implements IInternalHooksClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
this.telemetry.identify(info),
|
|
||||||
this.telemetry.track('Instance started', {
|
this.telemetry.track('Instance started', {
|
||||||
...info,
|
...info,
|
||||||
earliest_workflow_created: earliestWorkflowCreatedAt,
|
earliest_workflow_created: earliestWorkflowCreatedAt,
|
||||||
|
|
|
@ -138,38 +138,6 @@ export class Telemetry {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async identify(traits?: {
|
|
||||||
[key: string]: string | number | boolean | object | undefined | null;
|
|
||||||
}): Promise<void> {
|
|
||||||
return new Promise<void>((resolve) => {
|
|
||||||
if (this.postHog) {
|
|
||||||
this.postHog.identify({
|
|
||||||
distinctId: this.instanceId,
|
|
||||||
properties: {
|
|
||||||
...traits,
|
|
||||||
instanceId: this.instanceId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.rudderStack) {
|
|
||||||
this.rudderStack.identify(
|
|
||||||
{
|
|
||||||
userId: this.instanceId,
|
|
||||||
anonymousId: '000000000000',
|
|
||||||
traits: {
|
|
||||||
...traits,
|
|
||||||
instanceId: this.instanceId,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
resolve,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async track(
|
async track(
|
||||||
eventName: string,
|
eventName: string,
|
||||||
properties: ITelemetryTrackProperties = {},
|
properties: ITelemetryTrackProperties = {},
|
||||||
|
@ -208,7 +176,7 @@ export class Telemetry {
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
if (!this.postHog) return Promise.resolve(false);
|
if (!this.postHog) return Promise.resolve(false);
|
||||||
|
|
||||||
const fullId = [this.instanceId, userId].join('_'); // PostHog disallows # in ID
|
const fullId = [this.instanceId, userId].join('#');
|
||||||
|
|
||||||
return this.postHog.isFeatureEnabled(featureFlagName, fullId);
|
return this.postHog.isFeatureEnabled(featureFlagName, fullId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue