Fathom Analytics: Privacy-Focused Website Analytics

Search for a command to run...

No comments yet. Be the first to comment.
Have you ever wondered how to set a hotkey to focus an input field in your React application? Follow along to learn how. We'll even handle showing different hotkeys based on whether the user is on a Mac or Windows system. Implementation const SearchI...

As a software engineer, choosing and understanding your text editor is important part of your work, as it impacts your productivity and workflow efficiency. It's like choosing the perfect tool for any trade - you need to know what tool to use and how...

Design systems are essential tools for software engineers as they provide a structured framework for maintaining consistency and coherence in product design. By offering clear guidelines and standards, design systems streamline the development proces...

Let's Build our own real-time page view tracker using Next.js as the frontend framework and a Postgres database hosted by Supabase. One of the best ways to understand how your blog posts are performing is by tracking page views. You can begin to unde...

One of the best ways to drive traffic to your website is to have strong Search Engine Optimization (SEO). You can provide search engines with all the URLs for your website using a Sitemap. This allows for easier indexing and more efficient crawling b...

Stop stealing your visitors' personal information. Recently, there has been a growing trend of people starting to take their privacy more serious. They realize that they are being tracked across the entire web of internet. Imagine someone following you all day watching every little thing you do without you knowing. They watch you while you are working, reading, and playing. Tools such as Google Analytics make it easier for you to have more insight on your website but this comes at the expense of invading your user's privacy. Countries are adding laws where website need to be more transparent on their tracking or will be fined. Great news is there are tools that are privacy oriented to help keep your visitors' privacy intact while still collecting valuable metrics.

I have been using Fathom Analytics (Referral link for $10 off) for my blog and side projects for the past couple months. It has been a great tool to collect metrics without invading my visitors' privacy.
Some great benefits using Fathom:
Using Fathom is extremely simple. All you need to do is add a new site in your Fathom settings. This will generate a Site ID and provide you with fathom script to be added to your HTML.
<!-- Fathom - beautiful, simple website analytics -->
<script src="https://cdn.usefathom.com/script.js" site="SITE_ID" defer></script>
<!-- / Fathom -->
They also have JavaScript package fathom-client to make it easy to add it to your JavaScript Frameworks. I use the client inside my Next.js projects.
Example Use in Next.js:
import { useEffect } from 'react'
import { useRouter } from 'next/router'
import * as Fathom from 'fathom-client'
export default function App({ Component, pageProps }) {
const router = useRouter()
useEffect(() => {
// Initialize Fathom when the app loads
Fathom.load('SITE_ID', {
includedDomains: ['YOUR_SITE_URL']
})
function onRouteChangeComplete() {
Fathom.trackPageview()
}
// Record a pageview when route changes
router.events.on('routeChangeComplete', onRouteChangeComplete)
// Unassign event listener
return () => {
router.events.off('routeChangeComplete', onRouteChangeComplete)
}
}, [])
return <Component {...pageProps} />
}
Be a part of the growing movement of improving privacy. I know privacy is important for me. Ditch the invasive tracking tools such as Google Analytics. Switch to something that still gives you metrics awhile still providing privacy. Try Fathom Analytics! (Referral link for $10 off).