feat(editor): Send template id as string in all telemetry events (#8498)
This commit is contained in:
committed by
GitHub
parent
839dd96c7d
commit
2aed788dc3
@@ -378,6 +378,7 @@ import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
import { useDeviceSupport } from 'n8n-design-system';
|
||||
import { useDebounce } from '@/composables/useDebounce';
|
||||
import { useCanvasPanning } from '@/composables/useCanvasPanning';
|
||||
import { tryToParseNumber } from '@/utils/typesUtils';
|
||||
|
||||
interface AddNodeOptions {
|
||||
position?: XYPosition;
|
||||
@@ -1327,7 +1328,7 @@ export default defineComponent({
|
||||
'User inserted workflow template',
|
||||
{
|
||||
source: 'workflow',
|
||||
template_id: templateId,
|
||||
template_id: tryToParseNumber(templateId),
|
||||
wf_template_repo_session_id: this.templatesStore.previousSessionId,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ import { createWorkflowFromTemplate } from '@/utils/templates/templateActions';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import { useCredentialSetupState } from '@/views/SetupWorkflowFromTemplateView/useCredentialSetupState';
|
||||
import { tryToParseNumber } from '@/utils/typesUtils';
|
||||
|
||||
export type NodeAndType = {
|
||||
node: INodeUi;
|
||||
@@ -200,14 +201,14 @@ export const useSetupTemplateStore = defineStore('setupTemplate', () => {
|
||||
'User inserted workflow template',
|
||||
{
|
||||
source: 'workflow',
|
||||
template_id: templateId.value,
|
||||
template_id: tryToParseNumber(templateId.value),
|
||||
wf_template_repo_session_id: templatesStore.currentSessionId,
|
||||
},
|
||||
{ withPostHog: true },
|
||||
);
|
||||
|
||||
telemetry.track('User saved new workflow from template', {
|
||||
template_id: isNaN(+templateId.value) ? templateId : +templateId.value,
|
||||
template_id: tryToParseNumber(templateId.value),
|
||||
workflow_id: createdWorkflow.id,
|
||||
wf_template_repo_session_id: templatesStore.currentSessionId,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user