: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(marketing-analytics): explain what the retention numbers mean (#91171)
Javier Bahamondesbfc1927505bd
diff --git a/frontend/src/scenes/marketing-analytics/MarketingAnalyticsScene.tsx b/frontend/src/scenes/marketing-analytics/MarketingAnalyticsScene.tsxindex 7b5e5cd04c6c..7e4c9ef494e2 100644--- a/frontend/src/scenes/marketing-analytics/MarketingAnalyticsScene.tsx+++ b/frontend/src/scenes/marketing-analytics/MarketingAnalyticsScene.tsx@@ -307,7 +307,7 @@ const TAB_DESCRIPTIONS: Record<string, string> = {[MarketingAnalyticsTab.ATTRIBUTION]:'Compare how each attribution model credits your conversions, to see which marketing you might be over or under valuing.',[MarketingAnalyticsTab.RETENTION]:- 'See how well the users each channel brings you stick around, grouped by the channel that first brought them in.',+ "See how well the users each channel brings you stick around, grouped by the channel that first brought them in. Each percentage is the share of a cohort seen again, measured against the cohort's original size.",[MarketingAnalyticsTab.INTEGRATION_HEALTH]:'Check that your ad platform campaigns are properly linked to UTM tracking in PostHog.',[MarketingAnalyticsTab.SETUP]:diff --git a/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionCohortTable.tsx b/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionCohortTable.tsxindex 1b8a560d820c..41462086d44e 100644--- a/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionCohortTable.tsx+++ b/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionCohortTable.tsx@@ -1,5 +1,6 @@import { BuiltLogic, LogicWrapper, useActions, useValues } from 'kea'+import { IconInfo } from '@posthog/icons'import { LemonCollapse, LemonTable, LemonTableColumn, Tooltip } from '@posthog/lemon-ui'import { useAttachedLogic } from 'lib/logic/scenes/useAttachedLogic'@@ -93,17 +94,21 @@ export function RetentionCohortTable({const columns: LemonTableColumn<MarketingAnalyticsRetentionRow, any>[] = [{title: 'Cohort',+ tooltip: "The period a person's first session landed in. People stay in the same row for the whole table.",dataIndex: 'cohortDate',render: (_, row) => cohortLabel(row.cohortDate, interval, timezone),},{title: 'Acquired',+ tooltip: `How many people had their first session of the date range in this period, credited to that session's ${dimensionLabel.toLowerCase()}. Each person is counted once. Options changes which sessions qualify and who counts as new.`,dataIndex: 'cohortSize',align: 'right',render: (_, row) => humanFriendlyNumber(row.cohortSize),},...labels.map((label, index) => ({title: label,+ tooltip:+ "The share of this cohort seen again in this period, measured against the cohort's original size, not against the period before.",key: label,align: 'center' as const,render: (_: any, row: MarketingAnalyticsRetentionRow) => {@@ -164,8 +169,13 @@ export function RetentionCohortTable({{caveats.length > 0 && <div className="text-secondary text-xs">{caveats.join(' ')}</div>}<RetentionSummaryTable rows={rows} labels={labels} dimensionLabel={dimensionLabel} /><div>- <div className="text-muted mb-1 text-xs font-semibold uppercase">- All {dimensionLabel.toLowerCase()}s+ <div className="text-muted mb-1 flex flex-wrap items-center gap-1 text-xs font-semibold uppercase">+ <span>All {dimensionLabel.toLowerCase()}s</span>+ <Tooltip+ title={`Every ${dimensionLabel.toLowerCase()} added together. People and returns are summed per cohort and the rate is recalculated, so a ${dimensionLabel.toLowerCase()} with ten thousand people counts for more than one with ten. It is not an average of the rates below.`}+ >+ <IconInfo className="text-base" />+ </Tooltip></div><LemonTable columns={columns} dataSource={baselineRows(rows)} size="small" firstColumnSticky /></div>diff --git a/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionSummaryTable.tsx b/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionSummaryTable.tsxindex fefe4f0d919e..d7ef7675233c 100644--- a/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionSummaryTable.tsx+++ b/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/components/RetentionTab/RetentionSummaryTable.tsx@@ -1,3 +1,4 @@+import { IconInfo } from '@posthog/icons'import { LemonTable, LemonTableColumn, Tooltip } from '@posthog/lemon-ui'import { gradateColor } from 'lib/utils/colors'@@ -34,6 +35,7 @@ export function RetentionSummaryTable({},{title: 'Acquired',+ tooltip: `How many people this ${dimensionLabel.toLowerCase()} acquired, added up across the cohorts shown in the tables below.`,dataIndex: 'acquired',align: 'right',sorter: (a, b) => a.acquired - b.acquired,@@ -41,6 +43,8 @@ export function RetentionSummaryTable({},...labels.slice(0, SUMMARY_PERIODS).map((label, period) => ({title: label,+ tooltip:+ 'The share of people who came back this many periods after arriving, pooled across cohorts and weighted by cohort size.',key: label,align: 'center' as const,// -1 puts a period no cohort has reached below every real rate, rather than level with 0%.@@ -77,8 +81,13 @@ export function RetentionSummaryTable({return (<div>- <div className="text-muted mb-1 text-xs font-semibold uppercase">- Compare {dimensionLabel.toLowerCase()}s+ <div className="text-muted mb-1 flex flex-wrap items-center gap-1 text-xs font-semibold uppercase">+ <span>Compare {dimensionLabel.toLowerCase()}s</span>+ <Tooltip+ title={`Every cohort of a ${dimensionLabel.toLowerCase()} blended into one row. People and returns are summed and the rate is recalculated, so this is not an average of the percentages below. A cohort of five thousand counts for more than one of fifty. "Other" is left out here.`}+ >+ <IconInfo className="text-base" />+ </Tooltip></div><LemonTable columns={columns} dataSource={summary} size="small" firstColumnSticky /><div className="text-secondary mt-1 text-xs">