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.

fix(web-analytics): hide filter bar on exported and shared tiles (#129345)

Matt Puadf0c0e9fcdb6
diff --git a/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx b/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx
index 8f7c676eb8e6..d514e59bce0e 100644
--- a/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx
+++ b/frontend/src/exporter/ExportedInsight/ExportedInsight.tsx
@@ -54,6 +54,7 @@ export function ExportedInsight({
dashboardItemId: insight.short_id,
cachedInsight: insight,
doNotLoad: true,
+ presentationOnly: true,
}
const { short_id, query, name, derived_name, description } = insight
diff --git a/frontend/src/types.ts b/frontend/src/types.ts
index b4a5457249c3..0e107004f37f 100644
--- a/frontend/src/types.ts
+++ b/frontend/src/types.ts
@@ -3668,6 +3668,8 @@ export interface InsightLogicProps<Q extends QuerySchema = QuerySchema> {
dashboardItemId?: InsightShortId | 'new' | `new-${string}` | null
/** id of the dashboard the insight is on (when the insight is being displayed on a dashboard) **/
dashboardId?: DashboardType['id']
+ /** render a static picture of the insight, hiding interactive controls such as filter bars (e.g. in exports) */
+ presentationOnly?: boolean
/** cached insight */
cachedInsight?: Partial<InsightModel> | null
/** Reuse recent completed responses when this embedded insight remounts. */
diff --git a/products/product_analytics/frontend/insights/editor/filters/WebAnalyticsEditorFilters.tsx b/products/product_analytics/frontend/insights/editor/filters/WebAnalyticsEditorFilters.tsx
index 6d78cc45ad37..9fbdd1bc6aae 100644
--- a/products/product_analytics/frontend/insights/editor/filters/WebAnalyticsEditorFilters.tsx
+++ b/products/product_analytics/frontend/insights/editor/filters/WebAnalyticsEditorFilters.tsx
@@ -27,7 +27,7 @@ export function WebAnalyticsEditorFilters({ query, embedded }: WebAnalyticsEdito
// Dashboard tiles render a readOnly snapshot. The Query component ignores
// updateQuerySource changes here (see Query.tsx — `query = readOnly ? propsQuery : localQuery`),
// so the toggle/filters never reflect the new state and clicks have no useful effect.
- if (insightProps.dashboardId != null) {
+ if (insightProps.dashboardId != null || insightProps.presentationOnly) {
return null
}