diff --git a/globalClientModule.ts b/globalClientModule.ts index 1452a09..fd84041 100644 --- a/globalClientModule.ts +++ b/globalClientModule.ts @@ -5,11 +5,11 @@ const module: ClientModule = { onRouteDidUpdate({location, previousLocation}) { if (ExecutionEnvironment.canUseDOM) { if (location.pathname != previousLocation?.pathname) { - _paq.push(['setCustomUrl', location.pathname]) - _paq.push(['setDocumentTitle', document.title]) - _paq.push(['trackPageView']) - console.log(`path = ${location.pathname}`) - console.log(`title = ${document.title}`) + setTimeout(() => { + _paq.push(['setCustomUrl', location.pathname]) + _paq.push(['setDocumentTitle', document.title]) + _paq.push(['trackPageView']) + }) } } }