mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -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([
|
||||
this.telemetry.identify(info),
|
||||
this.telemetry.track('Instance started', {
|
||||
...info,
|
||||
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(
|
||||
eventName: string,
|
||||
properties: ITelemetryTrackProperties = {},
|
||||
|
@ -208,7 +176,7 @@ export class Telemetry {
|
|||
): Promise<boolean> {
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue