From 5f5467387d997b5b0d069c555eecdecf163dc3d8 Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Thu, 21 Mar 2024 14:36:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88=20Adding=20telemetry=20details?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-ui/src/components/MainSidebar.vue | 5 ++++- packages/editor-ui/src/views/WorkflowsView.vue | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/MainSidebar.vue b/packages/editor-ui/src/components/MainSidebar.vue index 3d146d0f57abb..2605976062593 100644 --- a/packages/editor-ui/src/components/MainSidebar.vue +++ b/packages/editor-ui/src/components/MainSidebar.vue @@ -387,7 +387,10 @@ export default defineComponent({ }); }, trackTemplatesClick() { - this.$telemetry.track('User clicked on templates', {}); + this.$telemetry.track('User clicked on templates', { + role: this.usersStore.currentUserCloudInfo?.role, + active_workflow_count: this.workflowsStore.activeWorkflows.length, + }); }, async onUserActionToggle(action: string) { switch (action) { diff --git a/packages/editor-ui/src/views/WorkflowsView.vue b/packages/editor-ui/src/views/WorkflowsView.vue index 381e12a69610b..48495c8aa3d04 100644 --- a/packages/editor-ui/src/views/WorkflowsView.vue +++ b/packages/editor-ui/src/views/WorkflowsView.vue @@ -223,6 +223,7 @@ const WorkflowsView = defineComponent({ useSourceControlStore, useTagsStore, useTemplatesStore, + useUsersStore, ), readOnlyEnv(): boolean { return this.sourceControlStore.preferences.branchReadOnly; @@ -295,6 +296,10 @@ const WorkflowsView = defineComponent({ }, openTemplateRepository(category: string) { const url = this.templatesStore.getWebsiteCategoryURL(category); + this.$telemetry.track('User clicked Browse Sales Templates', { + role: this.usersStore.currentUserCloudInfo?.role, + active_workflow_count: this.workflowsStore.activeWorkflows.length, + }); window.open(url, '_blank'); }, async initialize() {