feat(editor): Bring back checklist experiment (no-changelog) (#6307)

* bring back checklist experiment

* move call to track experiment
This commit is contained in:
Ricardo Espinoza 2023-05-25 11:15:48 -04:00 committed by GitHub
parent f08373490e
commit b777f9031d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 1 deletions

View file

@ -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];

View file

@ -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 {

View file

@ -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) => {