Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add user cloud it to telemetry #7232

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/editor-ui/src/plugins/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ export class Telemetry {
}

identify(instanceId: string, userId?: string, versionCli?: string) {
RicardoE105 marked this conversation as resolved.
Show resolved Hide resolved
const traits = { instance_id: instanceId, version_cli: versionCli };
const settingsStore = useSettingsStore();
const traits = { instance_id: instanceId, version_cli: versionCli, userCloudId: '' };
RicardoE105 marked this conversation as resolved.
Show resolved Hide resolved
if (settingsStore.isCloudDeployment) {
traits.userCloudId = settingsStore.settings?.n8nMetadata?.userId ?? '';
}
if (userId) {
this.rudderStack.identify(`${instanceId}#${userId}`, traits);
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/workflow/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,7 @@ export interface IN8nUISettings {
urlBaseEditor: string;
versionCli: string;
n8nMetadata?: {
userId?: string;
[key: string]: string | number | undefined;
};
versionNotifications: IVersionNotificationSettings;
Expand Down
Loading