:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(experiments): read/write excluded variants via the column (frontend) (#65124)
Andersc4e867a26040
diff --git a/frontend/src/scenes/experiments/activity-descriptions/experimentChangeDescription.tsx b/frontend/src/scenes/experiments/activity-descriptions/experimentChangeDescription.tsxindex 15cde53b0bcf..6699ec79da2c 100644--- a/frontend/src/scenes/experiments/activity-descriptions/experimentChangeDescription.tsx+++ b/frontend/src/scenes/experiments/activity-descriptions/experimentChangeDescription.tsx@@ -45,6 +45,7 @@ type AllowedExperimentFields = Pick<| 'exposure_criteria'| 'parameters'| 'running_time_calculation'+ | 'excluded_variants'| 'primary_metrics_ordered_uuids'| 'secondary_metrics_ordered_uuids'> & {@@ -264,6 +265,11 @@ export const getExperimentChangeDescription = (.with({ field: 'running_time_calculation' }, () => {return 'updated the running time calculation'})+ .with({ field: 'excluded_variants' }, () => {+ // The change is described by the `parameters` matcher, which the backend keeps+ // mirrored while `parameters` is deprecated — avoid a duplicate line.+ return null+ }).otherwise(({ field, action }) => {// Fallback for unhandled fields - ensures all activity is visibleconst fieldName = field.replace(/_/g, ' ')diff --git a/frontend/src/scenes/experiments/experimentLogic.test.ts b/frontend/src/scenes/experiments/experimentLogic.test.tsindex 131fc6659cb1..58b59de1fab8 100644--- a/frontend/src/scenes/experiments/experimentLogic.test.ts+++ b/frontend/src/scenes/experiments/experimentLogic.test.ts@@ -2005,7 +2005,22 @@ describe('experimentLogic', () => {})describe('excluded variants', () => {- it('excludedVariants selector returns parameters.excluded_variants', async () => {+ it('excludedVariants selector reads the excluded_variants column first', async () => {+ await expectLogic(logic, () => {+ logic.actions.setExperiment({+ ...experiment,+ excluded_variants: ['test-3'],+ parameters: {+ ...experiment.parameters,+ excluded_variants: ['test-2'],+ },+ })+ }).toMatchValues({+ excludedVariants: ['test-3'],+ })+ })++ it('excludedVariants selector falls back to parameters.excluded_variants', async () => {await expectLogic(logic, () => {logic.actions.setExperiment({...experiment,@@ -2030,15 +2045,12 @@ describe('experimentLogic', () => {})})- it('setVariantExcluded sends a PATCH with the merged exclusion list', async () => {+ it('setVariantExcluded PATCHes excluded_variants with the merged exclusion list', async () => {jest.spyOn(api, 'update')api.update.mockClear()const existingExperiment = {...experiment,- parameters: {- ...experiment.parameters,- excluded_variants: ['test-1'],- },+ excluded_variants: ['test-1'],} as Experimentapi.update.mockResolvedValue(existingExperiment)@@ -2050,9 +2062,11 @@ describe('experimentLogic', () => {.toDispatchActions(['setVariantExcluded']).toFinishAllListeners()- const sentParams = (api.update.mock.calls[0][1] as Record<string, any>).parameters- expect(sentParams.excluded_variants).toEqual(expect.arrayContaining(['test-1', 'test-2']))- expect(sentParams.excluded_variants).toHaveLength(2)+ // The PATCH targets excluded_variants only — no parameters / feature_flag_variants resend.+ const sentBody = api.update.mock.calls[0][1] as Record<string, any>+ expect(sentBody.parameters).toBeUndefined()+ expect(sentBody.excluded_variants).toEqual(expect.arrayContaining(['test-1', 'test-2']))+ expect(sentBody.excluded_variants).toHaveLength(2)})it('setVariantExcluded(key, false) removes the key from the exclusion list', async () => {diff --git a/frontend/src/scenes/experiments/experimentLogic.tsx b/frontend/src/scenes/experiments/experimentLogic.tsxindex b13b97c8a6f1..6a396be6b6db 100644--- a/frontend/src/scenes/experiments/experimentLogic.tsx+++ b/frontend/src/scenes/experiments/experimentLogic.tsx@@ -2483,8 +2483,12 @@ export const experimentLogic = kea<experimentLogicType>([: current.filter((k: string) => k !== variantKey)try {+ // excluded_variants is the canonical column; the backend mirrors it into the+ // deprecated `parameters` blob. No need to resend feature_flag_variants — the+ // backend validates exclusions against the linked flag. The column updates+ // atomically, so we just send the new list.await asyncActions.updateExperiment({- parameters: { ...values.experiment.parameters, excluded_variants: next },+ excluded_variants: next,})lemonToast.success(excluded@@ -2728,7 +2732,10 @@ export const experimentLogic = kea<experimentLogicType>([variants: [(s) => [s.experiment], (experiment): MultivariateFlagVariant[] => getExperimentVariants(experiment)],excludedVariants: [(s) => [s.experiment],- (experiment: Experiment): string[] => experiment?.parameters?.excluded_variants ?? [],+ // Canonical home is the excluded_variants column; fall back to the legacy parameters+ // mirror during the deprecation window. `??` honors an explicit empty list.+ (experiment: Experiment): string[] =>+ experiment?.excluded_variants ?? experiment?.parameters?.excluded_variants ?? [],],experimentMathAggregationForTrends: [(s) => [s.experiment],diff --git a/frontend/src/types.ts b/frontend/src/types.tsindex 06024e46fd2e..3ad2b8d8c6d6 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -4758,6 +4758,8 @@ export interface Experiment {}}running_time_calculation?: ExperimentRunningTimeCalculationConfig+ /** Variant keys dropped from statistical analysis. Canonical home for what historically lived in `parameters.excluded_variants`. */+ excluded_variants?: string[] | nullstart_date?: string | nullend_date?: string | nullstatus?: ExperimentStatus | nulldiff --git a/products/experiments/mcp/tools.yaml b/products/experiments/mcp/tools.yamlindex 1ef62a982afb..26fbc4c5f972 100644--- a/products/experiments/mcp/tools.yaml+++ b/products/experiments/mcp/tools.yaml@@ -277,6 +277,9 @@ tools:meaning changes to one experiment's flag (e.g. shipping a variant, pausing) will affect both experiments.Always confirm the new flag key with the user before duplicating. Optionally provide a custom name (defaultsto "Original Name (Copy)").+ include_params:+ - name+ - feature_flag_keyparam_overrides:id:cast: string-intdiff --git a/services/mcp/src/tools/generated/experiments.ts b/services/mcp/src/tools/generated/experiments.tsindex 74fef3b820df..9dcaa8216a92 100644--- a/services/mcp/src/tools/generated/experiments.ts+++ b/services/mcp/src/tools/generated/experiments.ts@@ -255,7 +255,36 @@ const experimentDelete = (): ToolBase<typeof ExperimentDeleteSchema, Schemas.Exp})const ExperimentDuplicateSchema = ExperimentsDuplicateCreateParams.omit({ project_id: true })- .extend(ExperimentsDuplicateCreateBody.omit({ _create_in_folder: true }).shape)+ .extend(+ ExperimentsDuplicateCreateBody.omit({+ description: true,+ start_date: true,+ end_date: true,+ holdout_id: true,+ parameters: true,+ running_time_calculation: true,+ excluded_variants: true,+ secondary_metrics: true,+ saved_metrics_ids: true,+ filters: true,+ archived: true,+ deleted: true,+ type: true,+ exposure_criteria: true,+ metrics: true,+ metrics_secondary: true,+ stats_config: true,+ scheduling_config: true,+ allow_unknown_events: true,+ _create_in_folder: true,+ conclusion: true,+ conclusion_comment: true,+ primary_metrics_ordered_uuids: true,+ secondary_metrics_ordered_uuids: true,+ only_count_matured_users: true,+ update_feature_flag_params: true,+ }).shape+ ).extend({ id: z.preprocess(castStringToInt, ExperimentsDuplicateCreateParams.shape['id']) })const experimentDuplicate = (): ToolBase<typeof ExperimentDuplicateSchema, unknown> => ({@@ -267,84 +296,9 @@ const experimentDuplicate = (): ToolBase<typeof ExperimentDuplicateSchema, unknoif (params.name !== undefined) {body['name'] = params.name}- if (params.description !== undefined) {- body['description'] = params.description- }- if (params.start_date !== undefined) {- body['start_date'] = params.start_date- }- if (params.end_date !== undefined) {- body['end_date'] = params.end_date- }if (params.feature_flag_key !== undefined) {body['feature_flag_key'] = params.feature_flag_key}- if (params.holdout_id !== undefined) {- body['holdout_id'] = params.holdout_id- }- if (params.parameters !== undefined) {- body['parameters'] = params.parameters- }- if (params.running_time_calculation !== undefined) {- body['running_time_calculation'] = params.running_time_calculation- }- if (params.excluded_variants !== undefined) {- body['excluded_variants'] = params.excluded_variants- }- if (params.secondary_metrics !== undefined) {- body['secondary_metrics'] = params.secondary_metrics- }- if (params.saved_metrics_ids !== undefined) {- body['saved_metrics_ids'] = params.saved_metrics_ids- }- if (params.filters !== undefined) {- body['filters'] = params.filters- }- if (params.archived !== undefined) {- body['archived'] = params.archived- }- if (params.deleted !== undefined) {- body['deleted'] = params.deleted- }- if (params.type !== undefined) {- body['type'] = params.type- }- if (params.exposure_criteria !== undefined) {- body['exposure_criteria'] = params.exposure_criteria- }- if (params.metrics !== undefined) {- body['metrics'] = params.metrics- }- if (params.metrics_secondary !== undefined) {- body['metrics_secondary'] = params.metrics_secondary- }- if (params.stats_config !== undefined) {- body['stats_config'] = params.stats_config- }- if (params.scheduling_config !== undefined) {- body['scheduling_config'] = params.scheduling_config- }- if (params.allow_unknown_events !== undefined) {- body['allow_unknown_events'] = params.allow_unknown_events- }- if (params.conclusion !== undefined) {- body['conclusion'] = params.conclusion- }- if (params.conclusion_comment !== undefined) {- body['conclusion_comment'] = params.conclusion_comment- }- if (params.primary_metrics_ordered_uuids !== undefined) {- body['primary_metrics_ordered_uuids'] = params.primary_metrics_ordered_uuids- }- if (params.secondary_metrics_ordered_uuids !== undefined) {- body['secondary_metrics_ordered_uuids'] = params.secondary_metrics_ordered_uuids- }- if (params.only_count_matured_users !== undefined) {- body['only_count_matured_users'] = params.only_count_matured_users- }- if (params.update_feature_flag_params !== undefined) {- body['update_feature_flag_params'] = params.update_feature_flag_params- }const result = await context.api.request<unknown>({method: 'POST',path: `/api/projects/${encodeURIComponent(String(projectId))}/experiments/${encodeURIComponent(String(params.id))}/duplicate/`,diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-duplicate.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-duplicate.jsonindex a117fdafad63..b77e5d043bb7 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-duplicate.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-duplicate.json@@ -1,3857 +1,18 @@{"$schema": "https://json-schema.org/draft/2020-12/schema","properties": {- "allow_unknown_events": {- "default": false,- "description": "Suppresses the validation that rejects metrics referencing events not yet ingested by this project. REQUIRES explicit user confirmation before being set to true — never flip this silently to retry a failed call. The default validation catches typo'd event names and missing instrumentation. Set this to true only when the user has confirmed the event is intentional (e.g. they are about to instrument it).",- "type": "boolean"- },- "archived": {- "default": false,- "description": "Whether the experiment is archived.",- "type": "boolean"- },- "conclusion": {- "anyOf": [- {- "description": "* `won` - won\n* `lost` - lost\n* `inconclusive` - inconclusive\n* `stopped_early` - stopped_early\n* `invalid` - invalid",- "enum": ["won", "lost", "inconclusive", "stopped_early", "invalid"],- "type": "string"- },- {- "type": "null"- }- ],- "description": "Experiment conclusion: won, lost, inconclusive, stopped_early, or invalid.\n\n* `won` - won\n* `lost` - lost\n* `inconclusive` - inconclusive\n* `stopped_early` - stopped_early\n* `invalid` - invalid"- },- "conclusion_comment": {- "anyOf": [- {- "maxLength": 4000,- "type": "string"- },- {- "type": "null"- }- ],- "description": "Comment about the experiment conclusion."- },- "deleted": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "description": {- "anyOf": [- {- "maxLength": 3000,- "type": "string"- },- {- "type": "null"- }- ],- "description": "Description of the experiment hypothesis and expected outcomes."- },- "end_date": {- "anyOf": [- {- "format": "date-time",- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",- "type": "string"- },- {- "type": "null"- }- ]- },- "excluded_variants": {- "anyOf": [- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Variant keys to exclude from metric result calculations. Excluded variants are still served to users but omitted from statistical analysis. The baseline variant and holdout pseudo-variants cannot be excluded. Canonical home for what historically lived in `parameters.excluded_variants`; kept in sync with `parameters` during the deprecation window."- },- "exposure_criteria": {- "anyOf": [- {- "properties": {- "exposure_config": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Custom exposure event name. Required when kind is 'ExperimentEventExposureConfig'."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required when kind is 'ActionsNode'."- },- "kind": {- "anyOf": [- {- "enum": ["ExperimentEventExposureConfig", "ActionsNode"],- "type": "string"- },- {- "type": "null"- }- ],- "description": "Defaults to 'ExperimentEventExposureConfig' when omitted. Pass 'ActionsNode' for an action-based exposure."- },- "properties": {- "description": "Event property filters. Pass an empty array if no filters needed.",- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- }- },- "required": ["properties"],- "type": "object"- },- {- "type": "null"- }- ]- },- "filterTestAccounts": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "Exposure configuration including filter test accounts and custom exposure events."- },"feature_flag_key": {"description": "Unique key for the experiment's feature flag. Letters, numbers, hyphens, and underscores only. Search existing flags with the feature-flag-get-all tool first — reuse an existing flag when possible.","type": "string"},- "filters": {},- "holdout_id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "ID of a holdout group to exclude from the experiment."- },"id": {"description": "A unique integer value identifying this experiment.","type": "number"},- "metrics": {- "anyOf": [- {- "description": "List wrapper for OpenAPI schema generation — the field stores an array of metrics.",- "items": {- "properties": {- "completion_event": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For retention metrics: completion event."- },- "conversion_window": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Conversion window duration."- },- "denominator": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: denominator source."- },- "denominator_outlier_handling": {- "anyOf": [- {- "properties": {- "ignore_zeros": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "lower_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile)."- },- "upper_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile)."- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: winsorization applied to the denominator aggregate. Leave unset for a binomial-style denominator, which is never clamped."- },- "goal": {- "anyOf": [- {- "enum": ["increase", "decrease"],- "type": "string"- },- {- "type": "null"- }- ],- "description": "Whether higher or lower values indicate success."- },- "ignore_zeros": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ],- "description": "For mean metrics: exclude zero values when computing the winsorization percentile thresholds."- },- "kind": {- "const": "ExperimentMetric",- "default": "ExperimentMetric",- "type": "string"- },- "lower_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "For mean metrics: winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile). Per-user values below this percentile are clamped to it before aggregation."- },- "metric_type": {- "enum": ["funnel", "mean", "ratio", "retention"],- "type": "string"- },- "name": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Human-readable metric name."- },- "numerator": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: numerator source."- },- "numerator_outlier_handling": {- "anyOf": [- {- "properties": {- "ignore_zeros": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "lower_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile)."- },- "upper_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile)."- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: winsorization applied to the numerator aggregate, independently of the denominator and each with its own percentile thresholds."- },- "retention_window_end": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]- },- "retention_window_start": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]- },- "retention_window_unit": {- "anyOf": [- {- "enum": ["second", "minute", "hour", "day", "week", "month"],- "type": "string"- },- {- "type": "null"- }- ]- },- "series": {- "anyOf": [- {- "items": {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "For funnel metrics: array of EventsNode/ActionsNode steps."- },- "source": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For mean metrics: event source."- },- "start_event": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For retention metrics: start event."- },- "start_handling": {- "anyOf": [- {- "enum": ["first_seen", "last_seen"],- "type": "string"- },- {- "type": "null"- }- ]- },- "threshold": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "For mean metrics: when set, reports the percentage of users whose per-user summed/counted value reaches or exceeds this threshold. Only meaningful for sum/count math types."- },- "upper_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "For mean metrics: winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile). Per-user values above this percentile are clamped to it before aggregation."- },- "uuid": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Unique identifier. Auto-generated if omitted."- }- },- "required": ["metric_type"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Primary experiment metrics. Each metric must have kind='ExperimentMetric' and a metric_type: 'mean' (set source to an EventsNode with an event name), 'funnel' (set series to an array of EventsNode steps), 'ratio' (set numerator and denominator EventsNode entries), or 'retention' (set start_event and completion_event). Use the read-data-schema tool with query kind 'events' to find available events in the project."- },- "metrics_secondary": {- "anyOf": [- {- "description": "List wrapper for OpenAPI schema generation — the field stores an array of metrics.",- "items": {- "properties": {- "completion_event": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For retention metrics: completion event."- },- "conversion_window": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Conversion window duration."- },- "denominator": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: denominator source."- },- "denominator_outlier_handling": {- "anyOf": [- {- "properties": {- "ignore_zeros": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "lower_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile)."- },- "upper_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile)."- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: winsorization applied to the denominator aggregate. Leave unset for a binomial-style denominator, which is never clamped."- },- "goal": {- "anyOf": [- {- "enum": ["increase", "decrease"],- "type": "string"- },- {- "type": "null"- }- ],- "description": "Whether higher or lower values indicate success."- },- "ignore_zeros": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ],- "description": "For mean metrics: exclude zero values when computing the winsorization percentile thresholds."- },- "kind": {- "const": "ExperimentMetric",- "default": "ExperimentMetric",- "type": "string"- },- "lower_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "For mean metrics: winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile). Per-user values below this percentile are clamped to it before aggregation."- },- "metric_type": {- "enum": ["funnel", "mean", "ratio", "retention"],- "type": "string"- },- "name": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Human-readable metric name."- },- "numerator": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: numerator source."- },- "numerator_outlier_handling": {- "anyOf": [- {- "properties": {- "ignore_zeros": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "lower_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile)."- },- "upper_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "Winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile)."- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "For ratio metrics: winsorization applied to the numerator aggregate, independently of the denominator and each with its own percentile thresholds."- },- "retention_window_end": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]- },- "retention_window_start": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]- },- "retention_window_unit": {- "anyOf": [- {- "enum": ["second", "minute", "hour", "day", "week", "month"],- "type": "string"- },- {- "type": "null"- }- ]- },- "series": {- "anyOf": [- {- "items": {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "For funnel metrics: array of EventsNode/ActionsNode steps."- },- "source": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For mean metrics: event source."- },- "start_event": {- "anyOf": [- {- "properties": {- "event": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Event name, e.g. '$pageview'. Required for EventsNode."- },- "id": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Action ID. Required for ActionsNode."- },- "kind": {- "enum": ["EventsNode", "ActionsNode"],- "type": "string"- },- "math": {- "anyOf": [- {- "enum": [- "total",- "sum",- "unique_session",- "min",- "max",- "avg",- "dau",- "unique_group",- "hogql"- ],- "type": "string"- },- {- "type": "null"- }- ],- "description": "How to aggregate this source. Defaults to 'total' (event count). Use 'sum' together with math_property to aggregate a numeric property — e.g. a ratio numerator of revenue per order. Other options: 'avg', 'min', 'max', 'unique_session', 'dau', 'unique_group', 'hogql'."- },- "math_group_type_index": {- "anyOf": [- {- "anyOf": [- {- "const": 0,- "type": "number"- },- {- "const": 1,- "type": "number"- },- {- "const": 2,- "type": "number"- },- {- "const": 3,- "type": "number"- },- {- "const": 4,- "type": "number"- }- ]- },- {- "type": "null"- }- ],- "description": "Group type index to aggregate over. Required when math is 'unique_group'."- },- "math_hogql": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "HogQL aggregation expression. Required when math is 'hogql' — without it the metric silently falls back to a plain count/sum."- },- "math_property": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Numeric event property to aggregate when math is 'sum', 'avg', 'min', or 'max' (e.g. 'revenue')."- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "type": "string"- },- "label": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "anyOf": [- {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- {- "type": "null"- }- ],- "default": "exact"- },- "type": {- "const": "event",- "default": "event",- "description": "Event properties",- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "type": "array"- },- {- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event property filters to narrow which events are counted."- }- },- "required": ["kind"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "For retention metrics: start event."- },- "start_handling": {- "anyOf": [- {- "enum": ["first_seen", "last_seen"],- "type": "string"- },- {- "type": "null"- }- ]- },- "threshold": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "For mean metrics: when set, reports the percentage of users whose per-user summed/counted value reaches or exceeds this threshold. Only meaningful for sum/count math types."- },- "upper_bound_percentile": {- "anyOf": [- {- "maximum": 1,- "minimum": 0,- "type": "number"- },- {- "type": "null"- }- ],- "description": "For mean metrics: winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile). Per-user values above this percentile are clamped to it before aggregation."- },- "uuid": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Unique identifier. Auto-generated if omitted."- }- },- "required": ["metric_type"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Secondary metrics for additional measurements. Same format as primary metrics."- },"name": {"description": "Name of the experiment.","maxLength": 400,"type": "string"- },- "only_count_matured_users": {- "type": "boolean"- },- "parameters": {- "anyOf": [- {- "properties": {- "excluded_variants": {- "anyOf": [- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Variant keys to exclude from metric result calculations. Excluded variants are still served to users but omitted from statistical analysis."- },- "feature_flag_variants": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "description": "Variant key. Exactly one variant in feature_flag_variants must use key 'control' (lowercase, exactly) — that is the baseline used for analysis and the special key the experiment runtime expects. Other variants use keys like 'test', 'variant_a', 'variant_b'. Map natural-language names ('original', 'A', 'baseline') to 'control'.",- "type": "string"- },- "name": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Human-readable variant name."- },- "rollout_percentage": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ]- },- "split_percent": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Percentage of users assigned to this variant (0–100). All variants must sum to 100. One of split_percent (recommended) or rollout_percentage must be provided."- }- },- "required": ["key"],- "type": "object"- },- "type": "array"- },- {- "type": "null"- }- ],- "description": "Experiment variants. If specified, must include a variant with key 'control' (lowercase). Defaults to a 50/50 control/test split when omitted. Minimum 2, maximum 20."- },- "minimum_detectable_effect": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Minimum detectable effect as a percentage. Lower values need more users but catch smaller changes. Suggest 20–30% for most experiments."- },- "rollout_percentage": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Overall rollout percentage (0-100). Controls what fraction of all users enter the experiment. Users outside the rollout never see any variant and are excluded from analysis. Default: 100."- },- "variant_notes": {- "anyOf": [- {- "additionalProperties": {- "type": "string"- },- "propertyNames": {- "type": "string"- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "Free-text notes per variant, keyed by variant key. Use to document what each variant does or its reroute URL."- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "Experiment parameters JSON. Supported keys include `feature_flag_variants`, `rollout_percentage`, `minimum_detectable_effect`, `recommended_running_time`, `recommended_sample_size`, `custom_exposure_filter`, `excluded_variants` (list of variant keys to drop from statistical analysis; the baseline variant and holdout pseudo-variants cannot be excluded), and `variant_notes` (free-text notes per variant, keyed by variant key). The running-time calculator keys (`minimum_detectable_effect`, `recommended_running_time`, `recommended_sample_size`, `exposure_estimate_config`) are deprecated here — prefer `running_time_calculation`."- },- "primary_metrics_ordered_uuids": {},- "running_time_calculation": {- "anyOf": [- {- "properties": {- "exposure_estimate_config": {- "anyOf": [- {- "properties": {- "conversionRateInputType": {- "description": "'manual' when the baseline value and exposure rate were entered by hand, 'automatic' when derived from live experiment data.",- "enum": ["manual", "automatic"],- "type": "string"- },- "manualBaselineValue": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Manually entered baseline metric value (a conversion percentage for funnel metrics). Only used in manual mode."- },- "manualExposureRate": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Manually entered estimate of users exposed to the experiment per day. Only used in manual mode."- },- "manualMetricType": {- "anyOf": [- {- "enum": ["funnel", "mean_count", "mean_sum_or_avg"],- "type": "string"- },- {- "type": "null"- }- ],- "description": "Metric type the manual baseline value refers to. Only used in manual mode."- }- },- "required": ["conversionRateInputType"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "How the exposure estimate is configured: manual user-entered values or automatic from live experiment data."- },- "minimum_detectable_effect": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Minimum detectable effect as a percentage. Lower values need more users but catch smaller changes."- },- "recommended_running_time": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Estimated number of days needed to reach the recommended sample size."- },- "recommended_sample_size": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Recommended number of exposed users needed for statistical significance."- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "Running-time calculator state: `minimum_detectable_effect`, `recommended_running_time`, `recommended_sample_size`, and `exposure_estimate_config`. Canonical home for these keys, which historically lived in `parameters`; values are kept in sync with `parameters` during the deprecation window."- },- "saved_metrics_ids": {- "anyOf": [- {- "items": {},- "type": "array"- },- {- "type": "null"- }- ],- "description": "IDs of shared saved metrics to attach to this experiment. Each item has 'id' (saved metric ID) and 'metadata' with 'type' (primary or secondary)."- },- "scheduling_config": {},- "secondary_metrics": {},- "secondary_metrics_ordered_uuids": {},- "start_date": {- "anyOf": [- {- "format": "date-time",- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",- "type": "string"- },- {- "type": "null"- }- ]- },- "stats_config": {},- "type": {- "anyOf": [- {- "description": "* `web` - web\n* `product` - product",- "enum": ["web", "product"],- "type": "string"- },- {- "type": "null"- }- ],- "description": "Experiment type: web for frontend UI changes, product for backend/API changes.\n\n* `web` - web\n* `product` - product"- },- "update_feature_flag_params": {- "default": false,- "description": "When true, sync feature flag configuration from parameters to the linked feature flag. Draft experiments always sync regardless of update_feature_flag_params, so only required for non-drafts.",- "type": "boolean"}},"required": ["id", "name", "feature_flag_key"],