How to add privacy-focused Fathom analytics to WordPress
If you hear word analytics, you probably automatically think about Google Analytics. And that's ok - it's probably the oldest and best know website analytics until this day.
Google Analytics is free to use, and has a massive list of tools to get all kinds of statistical information about your website visitors, but it has it's own problems:
First - it's massive and complicated. I mean - it's toolset is built mainly for data analysts, so once you login to it's panel you probably don't know where and how to find the most important information about your website. You need to be an expert to make use of all the Google Analytics data. And that's confusing for most of us who are not data analysts.
Fathom shows you all the most important information about your site visitors in one page, easy enough for anyone to understand.
Fathom works differently - it does not store cookies, and does not identify website visitors like Google Analytics do, so you can use Fathom without website cookie notices, and without breaching any privacy policies. That's a huge win!
Once we know why it makes sense to use Fathom instead of Google Analytics in your WordPress website, we can get to the main question - how to add it to your WordPress website. And that's actually not hard at all! Fathom Analytics have a plugin to do it, and I'll guide you how to integrate Fathom analytics step by step.
How to add Fathom to WordPress website
To make things as simple as possible we'll first install Fathom Analytics plugin to WordPress. Go to Plugins >> Add new in your WordPress admin panel, and enter fathom analytics to the search box at the top. Then install and activate Fathom Analytics plugin.
Before creating Fathom account go to Settings >> Fathom Analytics page in your WordPress site. Here you'll need to add a special ID code for your website which you'll generate once you create Fathom account.
To make things as simple as possible leave the Fathom Analytics settings page open in your website, and go to Fathom website. Click on Free Trial button and create a Fathom account.
Onle the account is created you'll see Your sites page. Enter any name you want and hit Create site.
Copy the Site ID code you'll see in the window.
Now get back to Fathom Analytics plugin settings page in your WordPress website (Settings >> Fathom Analytics), and paste Site ID there.
You may want to see website visits directly in your WordPress admin panel. To be able to do that you need to create Fathom Share Password, and check Display Analytics Menu Item box.
P.S. if you don't want Fathom analytics to show up in WordPress dashboard you may skip password and Display Analytics Menu Item fields, but then you'll be able to view analytics only in Fathom's website.
Once information is added click Save Changes.
Next step is to open your website as a visitor - this way Fathom will detect your site, and Fathom analytics will be activated.
If you have any caching plugins in your site, don't forget to clean cache otherwise new analytics code may not be loaded, and Fathom won't detect that your website is using their analytics service.
If everything is done correctly, Fathom account page with show success message:
Now Fathom analytics is already working on your site, and you may stop here. But if you want to see Fathom analytics in WordPress admin panel, there's one thing you need to do. Click Go to Dashboard, and click on your site name.
Go to Site Settings >> Site sharing, and click button Shared (password protected). Now enter Share Password - the same you used in Fathom WordPress plugin, and hit Save button.
From now on you'll be able to view Fathom Analytics data about your site visitors directly from WordPress. Click Analytics in WordPress admin menu, and you'll get all the information in the same layout as in Fathom's website.
If you were prevously using Google Analytics in your WordPress, don't forget to remove it from your website.