: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
chore(experiments): stop exposing the superseded experiment settings (#104928)
Anders4b6e06f63732
diff --git a/frontend/src/generated/core/api.schemas.ts b/frontend/src/generated/core/api.schemas.tsindex 6784d50589f2..00210309d8c5 100644--- a/frontend/src/generated/core/api.schemas.ts+++ b/frontend/src/generated/core/api.schemas.ts@@ -4362,18 +4362,6 @@ export const OrganizationPluginsAccessLevelEnumApi = {Number9: 9,} as const-/**- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist- */-export type OrganizationDefaultExperimentStatsMethodEnumApi =- (typeof OrganizationDefaultExperimentStatsMethodEnumApi)[keyof typeof OrganizationDefaultExperimentStatsMethodEnumApi]--export const OrganizationDefaultExperimentStatsMethodEnumApi = {- Bayesian: 'bayesian',- Frequentist: 'frequentist',-} as const-export type OrganizationApiTeamsItem = { [key: string]: unknown }export type OrganizationApiProjectsItem = { [key: string]: unknown }@@ -4444,11 +4432,6 @@ export interface OrganizationApi {readonly is_ai_training_cta_shown: boolean | null/** Whether the organization has a countersigned Business Associate Agreement on file. When true, AI training stays opted out and cannot be changed. */readonly has_signed_baa: boolean- /** Default statistical method for new experiments in this organization.- *- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist */- default_experiment_stats_method?: OrganizationDefaultExperimentStatsMethodEnumApi | BlankEnumApi | null/** Default setting for 'Discard client IP data' for new projects in this organization. */default_anonymize_ips?: boolean/**diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.tsindex 1a0e0e947ced..61d32cb57827 100644--- a/frontend/src/lib/api.mock.ts+++ b/frontend/src/lib/api.mock.ts@@ -7,7 +7,6 @@ import {ActivationTaskStatus,CohortType,DataColorThemeModel,- ExperimentStatsMethod,ExperimentVelocityStats,FilterLogicalOperator,GroupType,@@ -220,7 +219,6 @@ export const MOCK_DEFAULT_ORGANIZATION: OrganizationType = {available_product_features: [],member_count: 2,logo_media_id: null,- default_experiment_stats_method: ExperimentStatsMethod.Bayesian,is_active: true,is_not_active_reason: null,is_pending_deletion: false,diff --git a/frontend/src/scenes/organizationLogic.tsx b/frontend/src/scenes/organizationLogic.tsxindex 7abbd398b820..f6786b44b45b 100644--- a/frontend/src/scenes/organizationLogic.tsx+++ b/frontend/src/scenes/organizationLogic.tsx@@ -67,7 +67,6 @@ export type OrganizationUpdatePayload = Partial<| 'read_only_mcp_access'| 'is_ai_data_processing_approved'| 'is_ai_training_opted_in'- | 'default_experiment_stats_method'| 'allow_publicly_shared_resources'| 'default_role_id'| 'default_anonymize_ips'diff --git a/frontend/src/scenes/settings/organization/VerifiedDomains/verifiedDomainImpactLogic.ts b/frontend/src/scenes/settings/organization/VerifiedDomains/verifiedDomainImpactLogic.tsindex 3176678bd1a5..efadf0195685 100644--- a/frontend/src/scenes/settings/organization/VerifiedDomains/verifiedDomainImpactLogic.ts+++ b/frontend/src/scenes/settings/organization/VerifiedDomains/verifiedDomainImpactLogic.ts@@ -41,7 +41,6 @@ export interface verifiedDomainImpactLogicActions {OrganizationType,| 'allow_publicly_shared_resources'| 'default_anonymize_ips'- | 'default_experiment_stats_method'| 'default_role_id'| 'enforce_2fa'| 'enforce_verified_domains'@@ -61,7 +60,6 @@ export interface verifiedDomainImpactLogicActions {OrganizationType,| 'allow_publicly_shared_resources'| 'default_anonymize_ips'- | 'default_experiment_stats_method'| 'default_role_id'| 'enforce_2fa'| 'enforce_verified_domains'diff --git a/frontend/src/types.ts b/frontend/src/types.tsindex 09f19886d02f..75fc9df59f80 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -618,7 +618,6 @@ export interface OrganizationType extends OrganizationBasicType {allow_publicly_shared_resources: booleanmetadata?: OrganizationMetadatamember_count: number- default_experiment_stats_method: ExperimentStatsMethoddefault_anonymize_ips?: booleandefault_role_id?: string | nulluses_most_specific_access_resolution?: boolean | nulldiff --git a/posthog/api/organization.py b/posthog/api/organization.pyindex 39ebe9e7a649..e69664c74a4f 100644--- a/posthog/api/organization.py+++ b/posthog/api/organization.py@@ -207,7 +207,6 @@ class OrganizationSerializer("is_ai_training_locked","is_ai_training_cta_shown","has_signed_baa",- "default_experiment_stats_method","default_anonymize_ips","default_role_id","is_active",diff --git a/posthog/dags/postgres_to_clickhouse_etl.py b/posthog/dags/postgres_to_clickhouse_etl.pyindex 0b2afe2baa7e..353452b5a23d 100644--- a/posthog/dags/postgres_to_clickhouse_etl.py+++ b/posthog/dags/postgres_to_clickhouse_etl.py@@ -172,7 +172,6 @@ _ORG_COLS = ["allow_publicly_shared_resources","plugins_access_level","for_internal_metrics",- "default_experiment_stats_method","customer_id","available_product_features","usage",@@ -227,7 +226,6 @@ def _organization_ddl() -> str:allow_publicly_shared_resources UInt8,plugins_access_level Int16,for_internal_metrics UInt8,- default_experiment_stats_method Nullable(String),customer_id Nullable(String),available_product_features Nullable(String), -- JSON stored as Stringusage Nullable(String), -- JSON stored as Stringdiff --git a/posthog/models/activity_logging/activity_log.py b/posthog/models/activity_logging/activity_log.pyindex 833c29262002..d39eee6f3c34 100644--- a/posthog/models/activity_logging/activity_log.py+++ b/posthog/models/activity_logging/activity_log.py@@ -362,7 +362,6 @@ field_name_overrides: dict[AuditableScope, dict[str, str]] = {"allow_publicly_shared_resources": "public sharing permissions","is_member_join_email_enabled": "member join email notifications","session_cookie_age": "session cookie age",- "default_experiment_stats_method": "default experiment stats method","is_ai_data_processing_approved": "third-party AI services","uses_most_specific_access_resolution": "most-specific access resolution",},diff --git a/posthog/test/activity_logging/test_organization_activity_logging.py b/posthog/test/activity_logging/test_organization_activity_logging.pyindex 7f03199068e5..87560bd79f31 100644--- a/posthog/test/activity_logging/test_organization_activity_logging.py+++ b/posthog/test/activity_logging/test_organization_activity_logging.py@@ -145,18 +145,6 @@ class TestOrganizationActivityLogging(ActivityLogTestHelper):assert name_change is not Noneself.assertEqual(name_change["after"], "Name Test Org Updated")- def test_organization_experiment_stats_method_logging(self):- organization = self.create_organization("Experiments Test Org")- self.update_organization(organization["id"], {"default_experiment_stats_method": "frequentist"})-- log = ActivityLog.objects.filter(organization_id=organization["id"], activity="updated").first()- assert log is not None- assert log.detail is not None- changes = log.detail.get("changes", [])- stats_change = next((c for c in changes if c["field"] == "default experiment stats method"), None)- assert stats_change is not None- self.assertEqual(stats_change["after"], "frequentist")-def test_organization_2fa_enforcement_logging(self):organization = self.create_organization("2FA Test Org")Organization.objects.filter(id=organization["id"]).update(diff --git a/products/platform_features/frontend/generated/api.schemas.ts b/products/platform_features/frontend/generated/api.schemas.tsindex eb570d73b0b5..009b67e30425 100644--- a/products/platform_features/frontend/generated/api.schemas.ts+++ b/products/platform_features/frontend/generated/api.schemas.ts@@ -37,24 +37,6 @@ export const OrganizationPluginsAccessLevelEnumApi = {Number9: 9,} as const-/**- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist- */-export type OrganizationDefaultExperimentStatsMethodEnumApi =- (typeof OrganizationDefaultExperimentStatsMethodEnumApi)[keyof typeof OrganizationDefaultExperimentStatsMethodEnumApi]--export const OrganizationDefaultExperimentStatsMethodEnumApi = {- Bayesian: 'bayesian',- Frequentist: 'frequentist',-} as const--export type BlankEnumApi = (typeof BlankEnumApi)[keyof typeof BlankEnumApi]--export const BlankEnumApi = {- '': '',-} as const-export type OrganizationApiTeamsItem = { [key: string]: unknown }export type OrganizationApiProjectsItem = { [key: string]: unknown }@@ -125,11 +107,6 @@ export interface OrganizationApi {readonly is_ai_training_cta_shown: boolean | null/** Whether the organization has a countersigned Business Associate Agreement on file. When true, AI training stays opted out and cannot be changed. */readonly has_signed_baa: boolean- /** Default statistical method for new experiments in this organization.- *- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist */- default_experiment_stats_method?: OrganizationDefaultExperimentStatsMethodEnumApi | BlankEnumApi | null/** Default setting for 'Discard client IP data' for new projects in this organization. */default_anonymize_ips?: boolean/**@@ -238,11 +215,6 @@ export interface PatchedOrganizationApi {readonly is_ai_training_cta_shown?: boolean | null/** Whether the organization has a countersigned Business Associate Agreement on file. When true, AI training stays opted out and cannot be changed. */readonly has_signed_baa?: boolean- /** Default statistical method for new experiments in this organization.- *- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist */- default_experiment_stats_method?: OrganizationDefaultExperimentStatsMethodEnumApi | BlankEnumApi | null/** Default setting for 'Discard client IP data' for new projects in this organization. */default_anonymize_ips?: boolean/**@@ -356,6 +328,12 @@ export const RoleAtOrganizationEnumApi = {Other: 'other',} as const+export type BlankEnumApi = (typeof BlankEnumApi)[keyof typeof BlankEnumApi]++export const BlankEnumApi = {+ '': '',+} as const+/*** @nullable*/diff --git a/products/platform_features/frontend/generated/api.zod.ts b/products/platform_features/frontend/generated/api.zod.tsindex 104d78968ade..1ef0458af5ce 100644--- a/products/platform_features/frontend/generated/api.zod.ts+++ b/products/platform_features/frontend/generated/api.zod.ts@@ -47,16 +47,6 @@ export const CreateBody = /* @__PURE__ */ zod.object({.boolean().nullish().describe('When True, this organization allows its data to be used to train PostHog AI models.'),- default_experiment_stats_method: zod- .union([- zod.enum(['bayesian', 'frequentist']).describe('\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'),- zod.enum(['']),- zod.null(),- ])- .optional()- .describe(- 'Default statistical method for new experiments in this organization.\n\n\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'- ),default_anonymize_ips: zod.boolean().optional()@@ -105,16 +95,6 @@ export const UpdateBody = /* @__PURE__ */ zod.object({.boolean().nullish().describe('When True, this organization allows its data to be used to train PostHog AI models.'),- default_experiment_stats_method: zod- .union([- zod.enum(['bayesian', 'frequentist']).describe('\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'),- zod.enum(['']),- zod.null(),- ])- .optional()- .describe(- 'Default statistical method for new experiments in this organization.\n\n\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'- ),default_anonymize_ips: zod.boolean().optional()@@ -163,16 +143,6 @@ export const PartialUpdateBody = /* @__PURE__ */ zod.object({.boolean().nullish().describe('When True, this organization allows its data to be used to train PostHog AI models.'),- default_experiment_stats_method: zod- .union([- zod.enum(['bayesian', 'frequentist']).describe('\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'),- zod.enum(['']),- zod.null(),- ])- .optional()- .describe(- 'Default statistical method for new experiments in this organization.\n\n\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'- ),default_anonymize_ips: zod.boolean().optional()diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 782f6b67a56a..399a6b1343b2 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -60659,18 +60659,6 @@ export namespace Schemas {Number9: 9,} as const;- /**- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist- */- export type OrganizationDefaultExperimentStatsMethodEnum = typeof OrganizationDefaultExperimentStatsMethodEnum[keyof typeof OrganizationDefaultExperimentStatsMethodEnum];--- export const OrganizationDefaultExperimentStatsMethodEnum = {- Bayesian: 'bayesian',- Frequentist: 'frequentist',- } as const;-export interface Organization {readonly id: string;/** @maxLength 64 */@@ -60735,11 +60723,6 @@ export namespace Schemas {readonly is_ai_training_cta_shown: boolean | null;/** Whether the organization has a countersigned Business Associate Agreement on file. When true, AI training stays opted out and cannot be changed. */readonly has_signed_baa: boolean;- /** Default statistical method for new experiments in this organization.- *- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist */- default_experiment_stats_method?: OrganizationDefaultExperimentStatsMethodEnum | BlankEnum | null;/** Default setting for 'Discard client IP data' for new projects in this organization. */default_anonymize_ips?: boolean;/**@@ -73304,11 +73287,6 @@ export namespace Schemas {readonly is_ai_training_cta_shown?: boolean | null;/** Whether the organization has a countersigned Business Associate Agreement on file. When true, AI training stays opted out and cannot be changed. */readonly has_signed_baa?: boolean;- /** Default statistical method for new experiments in this organization.- *- * * `bayesian` - Bayesian- * * `frequentist` - Frequentist */- default_experiment_stats_method?: OrganizationDefaultExperimentStatsMethodEnum | BlankEnum | null;/** Default setting for 'Discard client IP data' for new projects in this organization. */default_anonymize_ips?: boolean;/**diff --git a/services/mcp/src/generated/platform_features/api.ts b/services/mcp/src/generated/platform_features/api.tsindex c72bcdb01e04..a9f036996573 100644--- a/services/mcp/src/generated/platform_features/api.ts+++ b/services/mcp/src/generated/platform_features/api.ts@@ -59,16 +59,6 @@ export const PartialUpdateBody = () => zod.object({.boolean().nullish().describe('When True, this organization allows its data to be used to train PostHog AI models.'),- default_experiment_stats_method: zod- .union([- zod.enum(['bayesian', 'frequentist']).describe('\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'),- zod.enum(['']),- zod.null(),- ])- .optional()- .describe(- 'Default statistical method for new experiments in this organization.\n\n\* `bayesian` - Bayesian\n\* `frequentist` - Frequentist'- ),default_anonymize_ips: zod.boolean().optional()diff --git a/services/mcp/src/tools/generated/platform_features.ts b/services/mcp/src/tools/generated/platform_features.tsindex b070167f7ed2..2d32f79a75e8 100644--- a/services/mcp/src/tools/generated/platform_features.ts+++ b/services/mcp/src/tools/generated/platform_features.ts@@ -629,7 +629,6 @@ const OrganizationEnforce2faSchema = () => {read_only_mcp_access: true,is_ai_data_processing_approved: true,is_ai_training_opted_in: true,- default_experiment_stats_method: true,default_anonymize_ips: true,default_role_id: true,}).shapediff --git a/services/mcp/tests/workers/fixtures/api_organizations_id.json b/services/mcp/tests/workers/fixtures/api_organizations_id.jsonindex 02a3972c6fab..8c1b6245cb91 100644--- a/services/mcp/tests/workers/fixtures/api_organizations_id.json+++ b/services/mcp/tests/workers/fixtures/api_organizations_id.json@@ -123,7 +123,6 @@"allow_publicly_shared_resources": true,"member_count": 1,"is_ai_data_processing_approved": true,- "default_experiment_stats_method": "bayesian","default_anonymize_ips": false,"default_role_id": null,"is_active": true,diff --git a/services/mcp/tests/workers/fixtures/api_users__me.json b/services/mcp/tests/workers/fixtures/api_users__me.jsonindex b04e60ad71a9..986a5354f2ab 100644--- a/services/mcp/tests/workers/fixtures/api_users__me.json+++ b/services/mcp/tests/workers/fixtures/api_users__me.json@@ -169,7 +169,6 @@"allow_publicly_shared_resources": true,"member_count": 1,"is_ai_data_processing_approved": true,- "default_experiment_stats_method": "bayesian","default_anonymize_ips": false,"default_role_id": null,"is_active": true,