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 telemetry event when users click on templates link #8625

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
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
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 &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this also related to the custom templates host? Or is there an option to hide the templates altogether?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidebar option will be different for custom template host but it will have the same key. So this will prevent this event from being sent if users still have in-app templates (custom host)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check. Merge away

!this.templatesStore.hasCustomTemplatesHost
) {
this.trackTemplatesClick();
}
break;
case 'about': {
this.trackHelpItemClick('about');
this.uiStore.openModal(ABOUT_MODAL_KEY);
Expand Down
Loading