diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2bc9e3f..262fe19 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -10,12 +10,10 @@ if(browser) { apm.setInitialPageLoadName($page.route.id); } - - let skipFirst = true; + let last = typeof window !== "undefined" && window.location.pathname; afterNavigate(page => { if(!["link", "popstate"].includes(page.type)) return; // ignore post hydration and automatic goto - if(skipFirst) return skipFirst = false; if(window.goatcounter) window.goatcounter.count({ path: window.location.pathname, title: page.title,