feat: Add events to enable onboarding checklist (#5536)

* feat: Add new event hooks

* fix: update event

* feat: Add more functionality for webhooks

*  Not sending onboarding checklist event from templates page

* 🔥 Removing quotes added by mistake

*  Added rest of events needed for onboarding checklist

* 💄 Hiding appcues checklist inside iframes

* 💄 Updating appcues selector

* fix: remove unnessary fix

* fix: fix schedule node

* refactor: bake events into segment store

* refactor: rename store

* refactor: use node keys

* refactor: remove unnessary

* chore: clean up store

* refactor: add key for event

* fix: allow tracking on template pages

* chore: remove comment

* fix: buidl

* refactor: block event if in iframe

* fix: fix tracking nodes

* refactor: track experiments once

* fix: ensure tracking works

* chore: remove comment

* fix: lint

* fix: lint

---------

Co-authored-by: Milorad Filipovic <milorad@n8n.io>
This commit is contained in:
Mutasem Aldmour
2023-02-28 13:44:37 +03:00
committed by GitHub
parent ae634407a4
commit 20c4919513
9 changed files with 192 additions and 54 deletions

View File

@@ -33,6 +33,7 @@ import { useNodeTypesStore } from '@/stores/nodeTypes';
import { useCredentialsStore } from '@/stores/credentials';
import { useSettingsStore } from '@/stores/settings';
import { parse } from 'flatted';
import { useSegment } from '@/stores/segment';
export const pushConnection = mixins(
externalHooks,
@@ -58,6 +59,7 @@ export const pushConnection = mixins(
useUIStore,
useWorkflowsStore,
useSettingsStore,
useSegment,
),
sessionId(): string {
return this.rootStore.sessionId;
@@ -515,6 +517,9 @@ export const pushConnection = mixins(
runDataExecutedStartData: runDataExecuted.data.startData,
resultDataError: runDataExecuted.data.resultData.error,
});
if (!runDataExecuted.data.resultData.error) {
this.segmentStore.trackSuccessfulWorkflowExecution(runDataExecuted);
}
} else if (receivedData.type === 'executionStarted') {
const pushData = receivedData.data;