: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
refactor(marketing-analytics): drop the retention capabilities nothing emits (#81566)
Javier Bahamondes57ad611e0314
diff --git a/products/marketing_analytics/backend/api.py b/products/marketing_analytics/backend/api.pyindex 7e2a4c9820b0..01340b5ee345 100644--- a/products/marketing_analytics/backend/api.py+++ b/products/marketing_analytics/backend/api.py@@ -800,7 +800,7 @@ class SuggestionSerializer(serializers.Serializer):)unlocks = serializers.ListField(child=serializers.CharField(),- help_text="Capabilities this unblocks: cost, attribution, roas, cac, retention_by_channel, ltv_by_channel",+ help_text="Capabilities this unblocks: cost, attribution, roas, cac",)# DRF has no discriminated-union field and fighting drf-spectacular for one isn't# worth it. The shape is the `ApplyOp` union in `services/setup_types.py`, which is@@ -832,7 +832,7 @@ class SuggestionSerializer(serializers.Serializer):class CapabilityReadinessSerializer(serializers.Serializer):- capability = serializers.CharField(help_text="cost/attribution/roas/cac/retention_by_channel/ltv_by_channel")+ capability = serializers.CharField(help_text="cost/attribution/roas/cac")status = serializers.CharField(help_text="unlocked/partial/blocked")explanation = serializers.CharField(help_text="Why it's in that state, in plain English")blocked_by = serializers.ListField(diff --git a/products/marketing_analytics/backend/services/setup_types.py b/products/marketing_analytics/backend/services/setup_types.pyindex 302f639a5f91..6486709df19c 100644--- a/products/marketing_analytics/backend/services/setup_types.py+++ b/products/marketing_analytics/backend/services/setup_types.py@@ -27,10 +27,6 @@ class SuggestionKind(StrEnum):FIX_CONVERSION_GOAL = "fix_conversion_goal"MARK_GOAL_AS_REVENUE = "mark_goal_as_revenue"MARK_GOAL_AS_CUSTOMER = "mark_goal_as_customer"- SET_ACTIVITY_EVENT = "set_activity_event"- SET_SIGNUP_EVENT = "set_signup_event"- SET_PAYMENT_EVENT = "set_payment_event"- SET_SUBSCRIPTION_EVENT = "set_subscription_event"class Capability(StrEnum):@@ -41,8 +37,6 @@ class Capability(StrEnum):ATTRIBUTION = "attribution"ROAS = "roas"CAC = "cac"- RETENTION_BY_CHANNEL = "retention_by_channel"- LTV_BY_CHANNEL = "ltv_by_channel"class ReadinessStatus(StrEnum):@@ -102,12 +96,6 @@ UNBLOCKS: dict[SuggestionKind, frozenset[SuggestionKind]] = {SuggestionKind.MARK_GOAL_AS_CUSTOMER,}),- SuggestionKind.SET_ACTIVITY_EVENT: frozenset(- {- SuggestionKind.SET_PAYMENT_EVENT,- SuggestionKind.SET_SUBSCRIPTION_EVENT,- }- ),}_SEVERITY_RANK = {Severity.ERROR: 2, Severity.WARNING: 1, Severity.INFO: 0}diff --git a/products/marketing_analytics/frontend/generated/api.schemas.ts b/products/marketing_analytics/frontend/generated/api.schemas.tsindex 42d018e633a0..91854b025207 100644--- a/products/marketing_analytics/frontend/generated/api.schemas.ts+++ b/products/marketing_analytics/frontend/generated/api.schemas.ts@@ -1513,7 +1513,7 @@ export interface SuggestionApi {title: string/** The concrete numbers behind the suggestion, so a user can sanity-check it without taking it on faith */evidence: string- /** Capabilities this unblocks: cost, attribution, roas, cac, retention_by_channel, ltv_by_channel */+ /** Capabilities this unblocks: cost, attribution, roas, cac */unlocks: string[]/** The operation that applies this suggestion, or null when there's nothing to automate. An object with an 'op' discriminator — see the ApplyOp union in setup_types. Pass it verbatim to apply_setup_ops; never hand-craft one. */apply: unknown@@ -1545,7 +1545,7 @@ export interface SuggestionApi {}export interface CapabilityReadinessApi {- /** cost/attribution/roas/cac/retention_by_channel/ltv_by_channel */+ /** cost/attribution/roas/cac */capability: string/** unlocked/partial/blocked */status: stringdiff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 1a16feee580d..38577b06621e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -14805,7 +14805,7 @@ export namespace Schemas {}export interface CapabilityReadiness {- /** cost/attribution/roas/cac/retention_by_channel/ltv_by_channel */+ /** cost/attribution/roas/cac */capability: string;/** unlocked/partial/blocked */status: string;@@ -68897,7 +68897,7 @@ export namespace Schemas {title: string;/** The concrete numbers behind the suggestion, so a user can sanity-check it without taking it on faith */evidence: string;- /** Capabilities this unblocks: cost, attribution, roas, cac, retention_by_channel, ltv_by_channel */+ /** Capabilities this unblocks: cost, attribution, roas, cac */unlocks: string[];/** The operation that applies this suggestion, or null when there's nothing to automate. An object with an 'op' discriminator — see the ApplyOp union in setup_types. Pass it verbatim to apply_setup_ops; never hand-craft one. */apply: unknown;