feat: Remove PostHog event calls (#6915)

This commit is contained in:
Ricardo Espinoza
2023-08-17 11:39:32 -04:00
committed by GitHub
parent 41c3cc89ca
commit 270946a93b
13 changed files with 86 additions and 53 deletions

View File

@@ -68,6 +68,7 @@ import type {
import { setPageTitle } from '@/utils';
import { VIEWS } from '@/constants';
import { useTemplatesStore } from '@/stores/templates.store';
import { usePostHog } from '@/stores/posthog.store';
export default defineComponent({
name: 'TemplatesCollectionView',
@@ -78,7 +79,7 @@ export default defineComponent({
TemplatesView,
},
computed: {
...mapStores(useTemplatesStore),
...mapStores(useTemplatesStore, usePostHog),
collection(): null | ITemplatesCollectionFull {
return this.templatesStore.getCollectionById(this.collectionId);
},
@@ -122,8 +123,9 @@ export default defineComponent({
source: 'collection',
};
void this.$externalHooks().run('templatesCollectionView.onUseWorkflow', telemetryPayload);
this.$telemetry.track('User inserted workflow template', telemetryPayload);
this.$telemetry.track('User inserted workflow template', telemetryPayload, {
withPostHog: true,
});
this.navigateTo(event, VIEWS.TEMPLATE_IMPORT, id);
},
navigateTo(e: MouseEvent, page: string, id: string) {