feat(editor): Send template id as string in all telemetry events (#8498)

This commit is contained in:
Milorad FIlipović
2024-01-31 13:34:11 +01:00
committed by GitHub
parent 839dd96c7d
commit 2aed788dc3
6 changed files with 25 additions and 7 deletions

View File

@@ -69,6 +69,7 @@ import { getCredentialTypeName, isCredentialOnlyNodeType } from '@/utils/credent
import { useExternalHooks } from '@/composables/useExternalHooks';
import { useCanvasStore } from '@/stores/canvas.store';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { tryToParseNumber } from '@/utils/typesUtils';
export function getParentMainInputNode(workflow: Workflow, node: INode): INode {
const nodeType = useNodeTypesStore().getNodeType(node.type);
@@ -1094,7 +1095,7 @@ export const workflowHelpers = defineComponent({
const templateId = this.$route.query.templateId;
if (templateId) {
this.$telemetry.track('User saved new workflow from template', {
template_id: isNaN(+templateId) ? templateId : +templateId,
template_id: tryToParseNumber(String(templateId)),
workflow_id: workflowData.id,
wf_template_repo_session_id: this.templatesStore.previousSessionId,
});