Skip to content

Commit

Permalink
📈 Adding telemetry details
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Mar 21, 2024
1 parent 2be4f7b commit 5f54673
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/editor-ui/src/components/MainSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions packages/editor-ui/src/views/WorkflowsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ const WorkflowsView = defineComponent({
useSourceControlStore,
useTagsStore,
useTemplatesStore,
useUsersStore,
),
readOnlyEnv(): boolean {
return this.sourceControlStore.preferences.branchReadOnly;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 5f54673

Please sign in to comment.