From bf4f896373acb2530a8f322cd612a3de616d6d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Wed, 14 Feb 2024 13:26:44 +0100 Subject: [PATCH] feat: Add telemetry event when users click on templates link (#8625) --- packages/editor-ui/src/components/MainSidebar.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/editor-ui/src/components/MainSidebar.vue b/packages/editor-ui/src/components/MainSidebar.vue index 6eb77c2883..583c6aabf8 100644 --- a/packages/editor-ui/src/components/MainSidebar.vue +++ b/packages/editor-ui/src/components/MainSidebar.vue @@ -388,6 +388,9 @@ export default defineComponent({ workflow_id: this.workflowsStore.workflowId, }); }, + trackTemplatesClick() { + this.$telemetry.track('User clicked on templates', {}); + }, async onUserActionToggle(action: string) { switch (action) { case 'logout': @@ -419,6 +422,14 @@ export default defineComponent({ }, async handleSelect(key: string) { switch (key) { + case 'templates': + if ( + this.settingsStore.isTemplatesEnabled && + !this.templatesStore.hasCustomTemplatesHost + ) { + this.trackTemplatesClick(); + } + break; case 'about': { this.trackHelpItemClick('about'); this.uiStore.openModal(ABOUT_MODAL_KEY);