import { useRoutePath } from '@kbn/typed-react-router-config' ; import { useTrackPageview } from '../../../../observability/public' ; export function TrackPageview ( { children } ) { const routePath = useRoutePath ( ) ; useTrackPageview ( { app : 'apm' , path : routePath } , [ routePath ] ) ; useTrackPageview ( { app : 'apm' , path : routePath , delay : 15000 } , [ routePath ] ) ; return children ; }