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.

refactor(dashboards): skip unused survey fetch on dashboard pages (#103154)

Matt Pua7e01a1e01d1d
diff --git a/frontend/src/scenes/dashboard/DashboardItems.tsx b/frontend/src/scenes/dashboard/DashboardItems.tsx
index 4b20e4357fce..ebb17932108c 100644
--- a/frontend/src/scenes/dashboard/DashboardItems.tsx
+++ b/frontend/src/scenes/dashboard/DashboardItems.tsx
@@ -120,7 +120,10 @@ export function DashboardItems({ showCreateAnomalyAlertButton }: DashboardItemsP
const { renameInsight } = useActions(insightsModel)
const { reportDashboardTileRepositioned } = useActions(eventUsageLogic)
const { push } = useActions(router)
- const { data: surveyLinkedInsights, loading: surveyLinkedInsightsLoading } = useSurveyLinkedInsights({})
+ const { data: surveyLinkedInsights, loading: surveyLinkedInsightsLoading } = useSurveyLinkedInsights({
+ // Dashboard pages hide the survey suggestion in compact headers; notebook embeds also use this component and can show it.
+ skip: placement === DashboardPlacement.Dashboard,
+ })
const bestSurveyOpportunityFunnel = surveyLinkedInsightsLoading
? null