diff --git a/x-pack/plugins/apm/public/components/routing/track_pageview.tsx b/x-pack/plugins/apm/public/components/routing/track_pageview.tsx index 20e02a505bc43..7f4a03cae90be 100644 --- a/x-pack/plugins/apm/public/components/routing/track_pageview.tsx +++ b/x-pack/plugins/apm/public/components/routing/track_pageview.tsx @@ -11,8 +11,8 @@ import { useTrackPageview } from '../../../../observability/public'; export function TrackPageview({ children }: { children: React.ReactElement }) { const routePath = useRoutePath(); - useTrackPageview({ app: 'apm', path: routePath }); - useTrackPageview({ app: 'apm', path: routePath, delay: 15000 }); + useTrackPageview({ app: 'apm', path: routePath }, [routePath]); + useTrackPageview({ app: 'apm', path: routePath, delay: 15000 }, [routePath]); return children; }