Skip to content

: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.

feat(marketing): show engagement in the new dashboard (#99194)

Javier Bahamondesab11a1bd08e1
diff --git a/docs/internal/marketing-analytics-configuration-writes.md b/docs/internal/marketing-analytics-configuration-writes.md
index c45a52e5e01e..958f666adad1 100644
--- a/docs/internal/marketing-analytics-configuration-writes.md
+++ b/docs/internal/marketing-analytics-configuration-writes.md
@@ -18,4 +18,6 @@ Payloads exclude suggestion IDs, titles, evidence, goal names and UTM values. So
With `new-marketing-analytics-dashboard` enabled, the dashboard shows visitors, sessions and pageviews using the existing Web Overview query and metric cards. The date range, comparison and saved test-account filter apply to both the summary and channel table. Reload summary refreshes only the summary. The legacy dashboard remains available when the flag is off.
+Engagement displays session duration and bounce rate from the same Web Overview response as Acquisition. Both sections share date, comparison and test-account filters; rendering Engagement adds no extra query.
+
The new dashboard embeds the existing Attribution explorer as Conversion when `marketing-analytics-attribution` is enabled. It keeps goal selection, attribution models, conversion paths and the explorer’s date and test-account filters.
diff --git a/frontend/src/scenes/marketing-analytics/NewMarketingAnalyticsDashboard.tsx b/frontend/src/scenes/marketing-analytics/NewMarketingAnalyticsDashboard.tsx
index f8f8d2203ab9..49f3687813d5 100644
--- a/frontend/src/scenes/marketing-analytics/NewMarketingAnalyticsDashboard.tsx
+++ b/frontend/src/scenes/marketing-analytics/NewMarketingAnalyticsDashboard.tsx
@@ -98,9 +98,6 @@ export function NewMarketingAnalyticsDashboard(): JSX.Element {
const { response, responseLoading, responseError } = useValues(overviewLogic)
const { loadData } = useActions(overviewLogic)
const overview = response as WebOverviewQueryResponse | undefined
- const items = ['visitors', 'sessions', 'views'].flatMap((key) =>
- (overview?.results?.filter((item) => item.key === key) ?? []).map((item) => ({ ...item, value: item.value }))
- )
return (
<div className="mt-4 flex flex-col gap-4">
@@ -111,20 +108,32 @@ export function NewMarketingAnalyticsDashboard(): JSX.Element {
Reload summary
</LemonButton>
</div>
- <h2 className="mb-0">Acquisition</h2>
{responseError ? (
<LemonBanner type="error" action={{ children: 'Retry', onClick: () => loadData('force_async') }}>
- Could not load acquisition metrics. Try again.
+ Could not load traffic metrics. Try again.
</LemonBanner>
) : (
- <OverviewMetricCardGrid
- items={items}
- loading={responseLoading}
- numSkeletons={3}
- samplingRate={overview?.samplingRate}
- preComputeStrategy={overview?.preComputeStrategy}
- labelFromKey={labelFromKey}
- />
+ [
+ { title: 'Acquisition', keys: ['visitors', 'sessions', 'views'] },
+ { title: 'Engagement', keys: ['session duration', 'bounce rate'] },
+ ].map(({ title, keys }) => (
+ <section key={title} className="flex flex-col gap-2" aria-label={title}>
+ <h2 className="mb-0">{title}</h2>
+ <OverviewMetricCardGrid
+ items={keys.flatMap((key) =>
+ (overview?.results?.filter((item) => item.key === key) ?? []).map((item) => ({
+ ...item,
+ value: item.value,
+ }))
+ )}
+ loading={responseLoading}
+ numSkeletons={keys.length}
+ samplingRate={overview?.samplingRate}
+ preComputeStrategy={overview?.preComputeStrategy}
+ labelFromKey={labelFromKey}
+ />
+ </section>
+ ))
)}
{featureFlags[FEATURE_FLAGS.MARKETING_ANALYTICS_ATTRIBUTION] && (
<section aria-label="Conversion" className="flex flex-col gap-2">