mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-31 06:25:20 -04:00
fix fathom logging pageviews as notes/[slug]
This commit is contained in:
+4
-2
@@ -48,10 +48,12 @@ const App = ({ Component, pageProps }: Props) => {
|
|||||||
Fathom.load(config.fathomSiteId, {
|
Fathom.load(config.fathomSiteId, {
|
||||||
// don't track branch/deploy previews and localhost
|
// don't track branch/deploy previews and localhost
|
||||||
includedDomains: [config.siteDomain],
|
includedDomains: [config.siteDomain],
|
||||||
|
// we trigger pageview sending manually below, don't also do it on script load
|
||||||
|
auto: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const onRouteChangeComplete = () => {
|
const onRouteChangeComplete = (url: string) => {
|
||||||
Fathom.trackPageview();
|
Fathom.trackPageview({ url });
|
||||||
};
|
};
|
||||||
|
|
||||||
// needs to be triggered manually on link clicks (the page doesn't actually change)
|
// needs to be triggered manually on link clicks (the page doesn't actually change)
|
||||||
|
|||||||
Reference in New Issue
Block a user