feat(editor): Add more telemetry for workflow inputs (no-changelog) (#12862)

This commit is contained in:
Milorad FIlipović
2025-01-27 15:36:59 +01:00
committed by GitHub
parent eabf160957
commit 6dd90c8764
2 changed files with 51 additions and 1 deletions

View File

@@ -837,6 +837,25 @@ function valueChanged(value: NodeParameterValueType | {} | Date) {
parameter: props.parameter.name,
});
}
// Track workflow input data mode change
const isWorkflowInputParameter =
props.parameter.name === 'inputSource' && props.parameter.default === 'workflowInputs';
if (isWorkflowInputParameter) {
trackWorkflowInputModeEvent(value as string);
}
}
function trackWorkflowInputModeEvent(value: string) {
const telemetryValuesMap: Record<string, string> = {
workflowInputs: 'fields',
jsonExample: 'json',
passthrough: 'all',
};
telemetry.track('User chose input data mode', {
option: telemetryValuesMap[value],
workflow_id: workflowsStore.workflowId,
node_id: node.value?.id,
});
}
async function optionSelected(command: string) {