Skip to content

Commit

Permalink
[APM] Invalidate trackPageview on route change (#107741) (#107828)
Browse files Browse the repository at this point in the history
Closes #107728.

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
  • Loading branch information
kibanamachine and dgieselaar committed Aug 6, 2021
1 parent 209b062 commit 44c1d99
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 44c1d99

Please sign in to comment.