Next.js analytics
Fathom Analytics works well with Next.js with minimal configuration. A huge thank you to Derrick Reimer, founder of SavvyCal for creating the incredible fathom-client package.
Vercel, who created Next.js, have written a fantastic guide on installing Fathom Analytics in your Next.js App.
Don't get stung by includedDomains
When using includedDomains, it must match your website URL. We've had a handful of people set their includedDomains to ["mywebsite.com"]
, but their actual website is ["www.mywebsite.com"]
(notice the www.). Fathom will not work if you do this. Therefore we recommend you match the URL, or you do the following
Fathom.load('YOUR_FATHOM_SITE_ID', { includedDomains: ["website.com", "www.website.com"],});
This way, you've covered yourself for future URL changes too.
If you're using Next.js 13
Please see: https://github.com/derrickreimer/fathom-client/issues/38 And: https://github.com/derrickreimer/fathom-client#upgrading-to-3x
Further customization
To learn about all the options we offer, read our advanced documentation here.
If you still have questions or require help with anything, please reach out to us and we'll happily get things sorted out for you.