mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-24 23:22:38 +08:00
fix(editor): Fix placeholder telemetry event triggering too many times (#23454)
This commit is contained in:
@@ -770,17 +770,6 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
|
||||
telemetry.track('Workflow builder journey', payload);
|
||||
}
|
||||
|
||||
watch(
|
||||
workflowTodos,
|
||||
(newTodos, oldTodos) => {
|
||||
// Only track if we had todos before and now we don't
|
||||
if (oldTodos && oldTodos.length > 0 && newTodos.length === 0) {
|
||||
trackWorkflowBuilderJourney('no_placeholder_values_left');
|
||||
}
|
||||
},
|
||||
{ deep: true },
|
||||
);
|
||||
|
||||
// Public API
|
||||
return {
|
||||
// State
|
||||
|
||||
+7
@@ -187,6 +187,13 @@ function trackBuilderPlaceholders(issue: WorkflowValidationIssue) {
|
||||
|
||||
onMounted(scrollIntoView);
|
||||
|
||||
// Track when all todos are resolved while the component is visible
|
||||
watch(hasValidationIssues, (hasIssues, hadIssues) => {
|
||||
if (hadIssues && !hasIssues) {
|
||||
builderStore.trackWorkflowBuilderJourney('no_placeholder_values_left');
|
||||
}
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
stopExecutionWatcher();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user