: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
fix(web-analytics): use web analytics date presets on page reports and modal (#88584)
Lucas Ricoy33bbcafd4d1e
diff --git a/frontend/src/scenes/web-analytics/PageReports.tsx b/frontend/src/scenes/web-analytics/PageReports.tsxindex 9c83a995c919..b18a33ec2189 100644--- a/frontend/src/scenes/web-analytics/PageReports.tsx+++ b/frontend/src/scenes/web-analytics/PageReports.tsx@@ -8,6 +8,7 @@ import { FilterBar } from 'lib/components/FilterBar'import { FEATURE_FLAGS } from 'lib/constants'import { LemonInputSelect } from 'lib/lemon-ui/LemonInputSelect/LemonInputSelect'+import { webAnalyticsDateMapping } from './constants'import { pageReportsLogic } from './pageReportsLogic'import { PathCleaningToggle } from './PathCleaningToggle'import { Tiles } from './WebAnalyticsDashboard'@@ -53,7 +54,12 @@ export function PageReportsFilters({ tabs }: { tabs: JSX.Element }): JSX.Elementtop={tabs}left={<div className="flex flex-row flex-wrap gap-2 items-center w-full min-w-0">- <DateFilter dateFrom={dateFilter.dateFrom} dateTo={dateFilter.dateTo} onChange={setDates} />+ <DateFilter+ dateFrom={dateFilter.dateFrom}+ dateTo={dateFilter.dateTo}+ onChange={setDates}+ dateOptions={webAnalyticsDateMapping}+ /><WebAnalyticsCompareFilter /><LemonInputSelectclassName="flex-1 min-w-0"diff --git a/frontend/src/scenes/web-analytics/WebAnalyticsModal.tsx b/frontend/src/scenes/web-analytics/WebAnalyticsModal.tsxindex 74c9ae4647db..c66458286ea4 100644--- a/frontend/src/scenes/web-analytics/WebAnalyticsModal.tsx+++ b/frontend/src/scenes/web-analytics/WebAnalyticsModal.tsx@@ -11,6 +11,7 @@ import { WebQuery } from 'scenes/web-analytics/tiles/WebAnalyticsTile'import { ProductIntentContext, ProductKey } from '~/queries/schema/schema-general'import { ProductTab } from './common'+import { webAnalyticsDateMapping } from './constants'import { WebAnalyticsExport } from './WebAnalyticsExport'import { webAnalyticsLogic } from './webAnalyticsLogic'import { webAnalyticsModalLogic } from './webAnalyticsModalLogic'@@ -43,7 +44,12 @@ export const WebAnalyticsModal = (): JSX.Element | null => {<div className="WebAnalyticsModal deprecated-space-y-4"><div className="flex flex-row flex-wrap gap-2">{productTab !== ProductTab.MARKETING && <WebPropertyFilters />}- <DateFilter dateFrom={dateFrom} dateTo={dateTo} onChange={setDates} />+ <DateFilter+ dateFrom={dateFrom}+ dateTo={dateTo}+ onChange={setDates}+ dateOptions={webAnalyticsDateMapping}+ /><div className="ml-auto"><WebAnalyticsExport query={modal.query} insightProps={modal.insightProps} /></div>