How to add Fathom Analytics (to your Ruby on Rails app) and be more privacy conscious

Image for post
Image for post
Fathom Analytics.

Why Fathom Analytics?

Fathom Analytics is a privacy focused, non-surveillance capitalism, analytics solution that enables your business to have actionable insights without sponsoring the obliteration of humanity (curious to learn more then check out Shoshana Zuboff’s latest book).

  • Simple, privacy focused analytics
  • Simple uptime monitoring included
  • No cookie notices on your website
  • Unlimited websites and monitoring included
  • Surge-proof (they are ready to handle viral-level surges in your website traffic)
  • They pledge 2% of gross revenues to the planet

That should be all you need to know to make the switch from that other one.

How to add Fathom Analytics to your website

  1. Sign up for an account -> use our referral link to save $10
  2. After signing up, login and go to the “Sites” section of your dashboard (https://app.usefathom.com/#/settings/sites).
  3. Then, go to the “Add a new site” section.
Image for post
Image for post
Adding your website is really this simple.

4. Type your website in, e.g. example.com, and click on “Get site code →”.

5. Now you have a few options:

Image for post
Image for post
Embed options for Fathom Analytics, so easy.
  • You can choose a custom domain, a bit more advanced but you can read more about it here, to further ensure your analytics aren’t blocked by ad blocking scripts.
  • There’s an optional CMS / Framework (and they have a solid tutorial section for each one)
  • There’s a “Site ID” section for your reference (we won’t need it in this example)

6. We’re going to just need the HTML Embed Code at the bottom.

Image for post
Image for post
Copy this code, paste into your website html code (head section), and click on “Verify site code →”.

7. Click on the “Copy embed code” link in the lower right corner of the HTML Embed Code section.

8. Paste that code directly into the head section of your website. On Ruby on Rails app, we made a _head.html.erb partial and pasted it there:

Image for post
Image for post
One way, of many, to render partials in Ruby on Rails.
Image for post
Image for post
Inside our _head.html.erb partial we paste the Fathom Analytics code.

9. That’s it! You’re privacy focused analytics solution is now setup and good to go.

10. You will want to click on “Verify site code →” to double check that everything is working properly.

Optional

11. I highly recommend you enable uptime monitoring, since Fathom provides it for no extra charge and it’s as simple as a click:

Image for post
Image for post
Find this in the “Sites” section of your Fathom Analytics settings dashboard.

Click on the “Off” link on the far right and you will be prompted to input some contact information for uptime monitoring (this is where they will send you the monitoring notifications when your website goes offline or comes back online from being offline):

Image for post
Image for post
Uptime monitoring setup for Fathom Analytics.

12. Enter your information and then click on “Enable monitoring →”.

13. Woohoo! Your uptime monitoring is now setup and you will receive notifications whenever your website goes offline.

You will also see that it now says “Active” under the monitoring column in the “Sites” section of your settings dashboard:

Image for post
Image for post
Sara’s website with uptime monitoring “active” with Fathom Analytics.

Conclusion

It’s incredibly easy to setup, run, and utilize Fathom Analytics for your business.

When we started our software company, we were considering foregoing analytics altogether. Thankfully, we discovered Fathom Analytics and we’ve never regretted the choice.

We’re proud of being able to say “goodbye” to those annoying we’re spying on you and enabling you to be used you as the raw material in a new age of exploitation cookie notices.

Co-founder @ Core Theory

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store