mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat: Clean up onboarding experiment (#6873)
* feat: Clean up onboarding experiment * chore: clean up
This commit is contained in:
parent
905eef8559
commit
3619345169
|
@ -532,13 +532,7 @@ export const TEMPLATES_EXPERIMENT = {
|
||||||
variantIds: ['1932', '1930', '1931', '1933', '1750', '1748', '1435'],
|
variantIds: ['1932', '1930', '1931', '1933', '1750', '1748', '1435'],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ONBOARDING_EXPERIMENT = {
|
export const EXPERIMENTS_TO_TRACK = [TEMPLATES_EXPERIMENT.name];
|
||||||
name: '004_checklist',
|
|
||||||
control: 'control',
|
|
||||||
variant: 'variant',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const EXPERIMENTS_TO_TRACK = [TEMPLATES_EXPERIMENT.name, ONBOARDING_EXPERIMENT.name];
|
|
||||||
|
|
||||||
export const NODE_TYPES_EXCLUDED_FROM_OUTPUT_NAME_APPEND = [FILTER_NODE_TYPE];
|
export const NODE_TYPES_EXCLUDED_FROM_OUTPUT_NAME_APPEND = [FILTER_NODE_TYPE];
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,7 @@ import { useSegment } from '@/stores/segment.store';
|
||||||
import { useRootStore } from '@/stores/n8nRoot.store';
|
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||||
import { useSettingsStore } from '@/stores/settings.store';
|
import { useSettingsStore } from '@/stores/settings.store';
|
||||||
import type { FeatureFlags } from 'n8n-workflow';
|
import type { FeatureFlags } from 'n8n-workflow';
|
||||||
import {
|
import { EXPERIMENTS_TO_TRACK, LOCAL_STORAGE_EXPERIMENT_OVERRIDES } from '@/constants';
|
||||||
EXPERIMENTS_TO_TRACK,
|
|
||||||
LOCAL_STORAGE_EXPERIMENT_OVERRIDES,
|
|
||||||
ONBOARDING_EXPERIMENT,
|
|
||||||
} from '@/constants';
|
|
||||||
import { useTelemetryStore } from './telemetry.store';
|
import { useTelemetryStore } from './telemetry.store';
|
||||||
import { debounce } from 'lodash-es';
|
import { debounce } from 'lodash-es';
|
||||||
|
|
||||||
|
@ -22,7 +18,6 @@ export const usePostHog = defineStore('posthog', () => {
|
||||||
const usersStore = useUsersStore();
|
const usersStore = useUsersStore();
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
const telemetryStore = useTelemetryStore();
|
const telemetryStore = useTelemetryStore();
|
||||||
const segmentStore = useSegment();
|
|
||||||
const rootStore = useRootStore();
|
const rootStore = useRootStore();
|
||||||
|
|
||||||
const featureFlags: Ref<FeatureFlags | null> = ref(null);
|
const featureFlags: Ref<FeatureFlags | null> = ref(null);
|
||||||
|
@ -165,10 +160,6 @@ export const usePostHog = defineStore('posthog', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
trackedDemoExp.value[name] = variant;
|
trackedDemoExp.value[name] = variant;
|
||||||
|
|
||||||
if (name === ONBOARDING_EXPERIMENT.name && variant === ONBOARDING_EXPERIMENT.variant) {
|
|
||||||
segmentStore.showAppCuesChecklist();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -13,7 +13,6 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||||
|
|
||||||
const EVENTS = {
|
const EVENTS = {
|
||||||
SHOW_CHECKLIST: 'Show checklist',
|
|
||||||
ADDED_MANUAL_TRIGGER: 'User added manual trigger',
|
ADDED_MANUAL_TRIGGER: 'User added manual trigger',
|
||||||
ADDED_SCHEDULE_TRIGGER: 'User added schedule trigger',
|
ADDED_SCHEDULE_TRIGGER: 'User added schedule trigger',
|
||||||
ADDED_DATA_TRIGGER: 'User added data trigger',
|
ADDED_DATA_TRIGGER: 'User added data trigger',
|
||||||
|
@ -35,15 +34,6 @@ export const useSegment = defineStore('segment', () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const showAppCuesChecklist = () => {
|
|
||||||
const isInIframe = window.location !== window.parent.location;
|
|
||||||
if (isInIframe) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
track(EVENTS.SHOW_CHECKLIST);
|
|
||||||
};
|
|
||||||
|
|
||||||
const trackAddedTrigger = (nodeTypeName: string) => {
|
const trackAddedTrigger = (nodeTypeName: string) => {
|
||||||
if (!nodeTypesStore.isTriggerNode(nodeTypeName)) {
|
if (!nodeTypesStore.isTriggerNode(nodeTypeName)) {
|
||||||
return;
|
return;
|
||||||
|
@ -123,7 +113,6 @@ export const useSegment = defineStore('segment', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
showAppCuesChecklist,
|
|
||||||
track,
|
track,
|
||||||
trackAddedTrigger,
|
trackAddedTrigger,
|
||||||
trackSuccessfulWorkflowExecution,
|
trackSuccessfulWorkflowExecution,
|
||||||
|
|
Loading…
Reference in a new issue