mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
feat(editor): Bring back checklist experiment (no-changelog) (#6307)
* bring back checklist experiment * move call to track experiment
This commit is contained in:
parent
f08373490e
commit
b777f9031d
|
@ -530,7 +530,17 @@ export const TEMPLATE_EXPERIMENT = {
|
|||
variant: 'variant',
|
||||
};
|
||||
|
||||
export const EXPERIMENTS_TO_TRACK = [TEMPLATE_EXPERIMENT.name, AUTO_INSERT_ACTION_EXPERIMENT.name];
|
||||
export const ONBOARDING_EXPERIMENT = {
|
||||
name: '004_checklist',
|
||||
control: 'control',
|
||||
variant: 'variant',
|
||||
};
|
||||
|
||||
export const EXPERIMENTS_TO_TRACK = [
|
||||
TEMPLATE_EXPERIMENT.name,
|
||||
AUTO_INSERT_ACTION_EXPERIMENT.name,
|
||||
ONBOARDING_EXPERIMENT.name,
|
||||
];
|
||||
|
||||
export const NODE_TYPES_EXCLUDED_FROM_OUTPUT_NAME_APPEND = [FILTER_NODE_TYPE];
|
||||
|
||||
|
|
|
@ -2,12 +2,14 @@ import type { Ref } from 'vue';
|
|||
import { ref } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useSegment } from '@/stores/segment.store';
|
||||
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import type { FeatureFlags } from 'n8n-workflow';
|
||||
import {
|
||||
EXPERIMENTS_TO_TRACK,
|
||||
LOCAL_STORAGE_EXPERIMENT_OVERRIDES,
|
||||
ONBOARDING_EXPERIMENT,
|
||||
TEMPLATE_EXPERIMENT,
|
||||
} from '@/constants';
|
||||
import { useTelemetryStore } from './telemetry.store';
|
||||
|
@ -21,6 +23,7 @@ export const usePostHog = defineStore('posthog', () => {
|
|||
const usersStore = useUsersStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const telemetryStore = useTelemetryStore();
|
||||
const segmentStore = useSegment();
|
||||
const rootStore = useRootStore();
|
||||
|
||||
const featureFlags: Ref<FeatureFlags | null> = ref(null);
|
||||
|
@ -172,6 +175,10 @@ export const usePostHog = defineStore('posthog', () => {
|
|||
});
|
||||
|
||||
trackedDemoExp.value[name] = variant;
|
||||
|
||||
if (name === ONBOARDING_EXPERIMENT.name && variant === ONBOARDING_EXPERIMENT.variant) {
|
||||
segmentStore.showAppCuesChecklist();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
|
@ -13,6 +13,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
|
|||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
|
||||
const EVENTS = {
|
||||
SHOW_CHECKLIST: 'Show checklist',
|
||||
ADDED_MANUAL_TRIGGER: 'User added manual trigger',
|
||||
ADDED_SCHEDULE_TRIGGER: 'User added schedule trigger',
|
||||
ADDED_DATA_TRIGGER: 'User added data trigger',
|
||||
|
@ -39,6 +40,8 @@ export const useSegment = defineStore('segment', () => {
|
|||
if (isInIframe) {
|
||||
return;
|
||||
}
|
||||
|
||||
track(EVENTS.SHOW_CHECKLIST);
|
||||
};
|
||||
|
||||
const trackAddedTrigger = (nodeTypeName: string) => {
|
||||
|
|
Loading…
Reference in a new issue