Gatsby
Before you begin: Create your Fathom account and add your website to get its site ID. Already have one? You’re ready to follow the steps below.
Fathom Analytics works great with Gatsby.js. There are a few options for using Fathom with Gatsby:
- gatsby-plugin-fathom by Lars Graubner
- Fathom Analytics Gatsby Plugin by Benedicte Raae
- Use the manual instructions below:
- In your terminal, navigate to your Gatsby project
- Run cp
.cache/default-html.js src/html.js - Add your embed code just before
</head>in that file
Further customization
To learn about all the options we offer, read our advanced documentation here.
Ready to check your setup? Visit your published website, then open its Fathom dashboard to check for your first pageview. If it doesn’t appear, our installation troubleshooting guide will help.