Skip to content

Commit

Permalink
feat: Add telemetry event when users click on templates link (#8625)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic authored and despairblue committed Feb 16, 2024
1 parent 8e49f65 commit e90760b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/editor-ui/src/components/MainSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e90760b

Please sign in to comment.