feat: Add telemetry event when users click on templates link (#8625)

This commit is contained in:
Milorad FIlipović 2024-02-14 13:26:44 +01:00 committed by GitHub
parent 6bc1c3d7a8
commit bf4f896373
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);