It's no secret that I'm passionate about open source software, but I'm also extremely adamant about protecting the privacy of all users across the web. So when I decided to implement analytics on my own personal website, I ended up choosing Fathom (get a $10 credit using that link!).
You should research further into the company yourself if you're interested, but in a nutshell the Fathom platform provides:
Although this might sound like a "paid" blog post, I can assure you this is completely based on my own opinions and experience with the service. I'm just very pleased with the product :)
Enough chit-chat - let's breakdown how to setup Fathom on your own site hosted through Netlify!
I'm going into this tutorial with the assumption that you:
And that's all you need.
Even though you have the option to use the
default tracking script URL, I would highly recommend setting it up through your own domain. This helps avoid any browser extensions or firewalls that might block outside URL request made by individual sites.
Add a new custom domaininput
VALUE(we will copy this in a moment)
Open a new tab, and login to your Netlify account:
Team Overviewpage, navigate to the top-level
Add New Record
CNAMEfrom the dropdown of available options
CNAME(from the steps above) into the Name input
VALUE(from the steps above) into the Value input
That's it for DNS setup!
Now that we will be using our own custom domain for the script, it's time to actually add it to our website. From the same Fathom Settings page as before:
Add a new siteinput and click Get site code
Open a cold beer (or a bubbly soda if you prefer) and watch your website visitor stats come rolling in on the dashboard! Not only do you now have solid analytics on your website but you have the piece of mind that your users' privacy isn't being invaded. Everybody wins!