@@ -48,6 +50,47 @@ const StepInfo = (): JSX.Element => {
/>
Variants
Add up to 9 variants to test against your control.
diff --git a/frontend/src/scenes/experiments/experimentLogic.tsx b/frontend/src/scenes/experiments/experimentLogic.tsx
index 615e6c5b28c9f..a928b09db82cd 100644
--- a/frontend/src/scenes/experiments/experimentLogic.tsx
+++ b/frontend/src/scenes/experiments/experimentLogic.tsx
@@ -69,6 +69,7 @@ import { getMinimumDetectableEffect, transformFiltersForWinningVariant } from '.
const NEW_EXPERIMENT: Experiment = {
id: 'new',
name: '',
+ type: 'product',
feature_flag_key: '',
filters: {},
metrics: [],
@@ -159,6 +160,7 @@ export const experimentLogic = kea
([
setExperiment: (experiment: Partial) => ({ experiment }),
createExperiment: (draft?: boolean) => ({ draft }),
setNewExperimentInsight: (filters?: Partial) => ({ filters }),
+ setExperimentType: (type?: string) => ({ type }),
setExperimentExposureInsight: (filters?: Partial) => ({ filters }),
removeExperimentGroup: (idx: number) => ({ idx }),
setEditExperiment: (editing: boolean) => ({ editing }),
@@ -422,6 +424,9 @@ export const experimentLogic = kea([
})
}
},
+ setExperimentType: async ({ type }) => {
+ actions.setExperiment({ type: type })
+ },
setNewExperimentInsight: async ({ filters }) => {
let newInsightFilters
const aggregationGroupTypeIndex = values.experiment.parameters?.aggregation_group_type_index
diff --git a/frontend/src/scenes/experiments/experimentsLogic.ts b/frontend/src/scenes/experiments/experimentsLogic.ts
index 4548efe5f9941..9f4c5bb1ca706 100644
--- a/frontend/src/scenes/experiments/experimentsLogic.ts
+++ b/frontend/src/scenes/experiments/experimentsLogic.ts
@@ -3,8 +3,9 @@ import Fuse from 'fuse.js'
import { actions, connect, events, kea, path, reducers, selectors } from 'kea'
import { loaders } from 'kea-loaders'
import api from 'lib/api'
+import { FEATURE_FLAGS } from 'lib/constants'
import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
+import { featureFlagLogic, FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
import { teamLogic } from 'scenes/teamLogic'
import { userLogic } from 'scenes/userLogic'
@@ -142,6 +143,10 @@ export const experimentsLogic = kea([
return experiments.length === 0 && !experimentsLoading && !values.searchTerm && !values.searchStatus
},
],
+ webExperimentsAvailable: [
+ () => [featureFlagLogic.selectors.featureFlags],
+ (featureFlags: FeatureFlagsSet) => featureFlags[FEATURE_FLAGS.WEB_EXPERIMENTS],
+ ],
})),
events(({ actions }) => ({
afterMount: () => {