feat: Add workflow sharing telemetry (#4906)

* feat: Add workflow sharing telemetry

* chore: fix linting issue

* fix: fix telemetry typo
This commit is contained in:
Alex Grozav
2022-12-15 10:05:54 +02:00
committed by GitHub
parent 9956547504
commit ac066fc9f3
7 changed files with 84 additions and 6 deletions

View File

@@ -139,7 +139,13 @@ import SaveButton from '@/components/SaveButton.vue';
import TagsDropdown from '@/components/TagsDropdown.vue';
import InlineTextEdit from '@/components/InlineTextEdit.vue';
import BreakpointsObserver from '@/components/BreakpointsObserver.vue';
import { IWorkflowDataUpdate, IWorkflowDb, IWorkflowToShare, NestedRecord } from '@/Interface';
import {
IUser,
IWorkflowDataUpdate,
IWorkflowDb,
IWorkflowToShare,
NestedRecord,
} from '@/Interface';
import { saveAs } from 'file-saver';
import { titleChange } from '@/mixins/titleChange';
@@ -194,6 +200,9 @@ export default mixins(workflowHelpers, titleChange).extend({
useWorkflowsStore,
useUsersStore,
),
currentUser(): IUser | null {
return this.usersStore.currentUser;
},
dynamicTranslations(): NestedRecord<string> {
return this.uiStore.dynamicTranslations;
},
@@ -302,6 +311,12 @@ export default mixins(workflowHelpers, titleChange).extend({
name: WORKFLOW_SHARE_MODAL_KEY,
data: { id: this.currentWorkflowId },
});
this.$telemetry.track('User opened sharing modal', {
workflow_id: this.currentWorkflowId,
user_id_sharer: this.currentUser?.id,
sub_view: this.$route.name === VIEWS.WORKFLOWS ? 'Workflows listing' : 'Workflow editor',
});
},
onTagsEditEnable() {
this.$data.appliedTagIds = this.currentWorkflowTagIds;