in

How to Setup Fathom Lite for Your Website Analytics: The Ultimate 3000 Word Guide

default image

Hello friend! Having a website is an incredibly empowering thing. It‘s like having your own virtual piece of real estate on the internet. But just like physical property, your website is much more valuable if you understand how people are using it.

As a fellow technology enthusiast, I‘m sure you‘ll agree that website analytics provide invaluable data to help us improve our online presence. Metrics like visitor counts, landing pages, referral sources, and more give us crucial insights into our users‘ behavior.

In this 3000+ word guide, I‘ll walk you through step-by-step how to set up Fathom Lite for your website analytics. Fathom Lite is a free, open-source, privacy-focused alternative to Google Analytics.

I‘ll share my perspective as a data analyst on why website analytics matter, the shortcomings of Google Analytics, and why Fathom Lite is a great solution. You‘ll learn how to install and configure Fathom Lite on a Linux server, integrate it with your site, and view analytics in real-time.

Let‘s get started!

Why Website Analytics Are Crucial for Any Website Owner

Simply having a website online doesn‘t guarantee it will achieve your goals, whether those are generating leads, selling products, or building your brand. You need data and insights to understand how well your site is performing and how users are interacting with it.

As a data analyst, I can tell you web analytics should be one of the foundational tools for any website owner. Here are some key reasons why:

  • Identify high and low traffic pages: See which pages attract visitors and which don‘t. Optimize or remove poor performing pages.

  • Find referral sources: Discover where your visitors come from, like search engines, social media, or referring sites. Focus your marketing efforts on top referrers.

  • Analyze conversion rates: For ecommerce sites, track how many visits convert into sales. If the rate is low, make site improvements.

  • Identify UX issues: See where visitors run into problems completing actions like purchases. Pinpoint and fix pain points.

  • Personalize experiences: Track visitor behavior over time to segment users and provide tailored on-site experiences.

  • Compare campaigns: If you run marketing campaigns across channels like PPC or email, compare their effectiveness with web analytics.

  • Establish goals: Set key performance indicators like revenue targets, conversion rates, or visitor counts and track progress towards goals.

Those are just a few examples of how vital web analytics are for understanding your users and improving your website. The data can influence decisions about design, content, SEO, paid advertising, email marketing, and much more.

The Problem with Google Analytics: Why We Need an Alternative

Google Analytics is by far the most widely used web analytics platform today. According to BuiltWith, over 68% of the top 1 million websites use Google Analytics.

However, Google Analytics comes with some significant downsides:

Privacy issues: Google Analytics collects a large amount of personal data on site visitors without their knowledge or consent. Google uses this to build detailed user profiles and target ads.

Non-compliance with data laws: Google Analytics does not fully comply with privacy laws like GDPR. It can put site owners at legal risk.

Data ownership concerns: Website owners do not own or control analytics data collected by Google Analytics. Google can use it however it wants.

Ad blocking leads to incomplete data: Many visitors block Google Analytics with ad blockers, leading to potential data gaps.

Performance impact: The Google Analytics script is bulky, slowing page load times. This can negatively impact user experience.

While Google Analytics is free and popular, we as website owners deserve an alternative that prioritizes privacy, gives us full data ownership, and provides a smoother user experience for our visitors.

This is where Fathom Lite comes in…

Introducing Fathom Lite: The Privacy-Focused Google Analytics Alternative

Fathom Lite is an open-source, self-hosted web analytics platform built with a focus on privacy. It was created specifically to address the shortcomings of Google Analytics that we just covered.

Here‘s an overview of key reasons why Fathom Lite is a great Google Analytics alternative:

  • Lightweight script: The Fathom script is less than 2KB, much smaller than the 30+KB Analytics script. Faster page loads.

  • No cookies: Fathom Lite uses anonymous usage tracking and doesn‘t require invasive cookies. Greater visitor privacy.

  • Full GDPR compliance: Data collection and processing complies with GDPR requirements, removing legal liability.

  • You own the data: All website analytics data stays on your server. You control it completely.

  • Ad blocker resistant: Fathom works even if visitors use ad blockers, reducing data gaps.

  • Real-time stats: See visitor activity as it happens with dashboards updated in real time.

  • Open source: Fathom Lite is MIT licensed open source software with full transparency.

For website owners who value performance, privacy, and control over their analytics data, Fathom Lite is a fantastic choice to consider over Google Analytics.

Next, let‘s look at how to get Fathom Lite set up on your own Linux server.

Step-by-Step Guide to Installing Fathom Lite on Linux

Fathom Lite is self-hosted, meaning you‘ll need to install and run it on your own server rather than use a SaaS platform. This gives you full ownership of the software and data.

I‘ll walk you through how to install Fathom Lite on a Linux server step-by-step:

1. Download the Fathom Lite Binary

First, head to the Fathom Lite releases page on GitHub and download the latest version.

Make sure to download the binary that matches your server CPU architecture (AMD64, ARM, etc).

For example, on an Ubuntu server I would download fathom_linux_amd64.tar.gz

2. Extract the Binary

Next, upload and extract the Fathom Lite binary to your server:

tar -xzf fathom_linux_amd64.tar.gz

This will extract the fathom executable.

3. Move Fathom to /usr/local/bin

To make the fathom command globally accessible, move it to /usr/local/bin:

sudo mv fathom /usr/local/bin/fathom

And make sure it has execute permissions:

sudo chmod +x /usr/local/bin/fathom

Now you can run fathom from any directory.

4. Create a Fathom User

The next step is to create your admin user account that will manage Fathom:

fathom user add --email="[email protected]" --password="yourpassword"

Use your own email and secure password here.

5. Install Nginx

To proxy traffic to the Fathom server, we‘ll use Nginx web server. If you don‘t already have Nginx, install it:

sudo apt install nginx

Verify it installed correctly:

nginx -v

6. Configure Nginx for Fathom

Create a new Nginx server block file:

sudo nano /etc/nginx/sites-available/fathom

And paste this configuration:

server {
  listen 80;
  server_name analytics.yoursite.com;  

  location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_pass http://127.0.0.1:9000;
  }
}

This proxies traffic from analytics.yoursite.com to the Fathom server on port 9000.

Save the file and exit nano.

7. Enable the Nginx Fathom Site

To activate the Nginx configuration you just created:

sudo ln -s /etc/nginx/sites-available/fathom /etc/nginx/sites-enabled/fathom

This symlinks the config file into sites-enabled.

Lastly, test the config and reload Nginx:

sudo nginx -t
sudo systemctl reload nginx

8. Create a Systemd Service for Fathom

So the Fathom server starts on boot, we‘ll create a Systemd service.

Create a service file:

sudo nano /etc/systemd/system/fathom.service

And paste this:

[Unit]
Description=Fathom Analytics

[Service]
ExecStart=/usr/local/bin/fathom server
Restart=always
RestartSec=3
User=www-data

[Install]
WantedBy=multi-user.target

Here we configure Systemd to run fathom server on boot as the www-data user.

Save and exit nano, then reload Systemd:

sudo systemctl daemon-reload

9. Start the Fathom Service

Almost there! Now start the Fathom service:

sudo systemctl start fathom

And set it to start on boot:

sudo systemctl enable fathom

Fathom Lite is now up and running!

10. Add the Tracking Code to Your Site

The final step is to add the Fathom tracking code to your website.

Visit http://analytics.yoursite.com and sign in with your Fathom credentials.

Click "Add site" and give your site a name.

Fathom will generate a script. Copy this and add it to your website‘s header or footer.

Now visit your site and you should see real-time usage stats in the Fathom dashboard!

And that‘s it! Fathom Lite is now successfully installed and gathering analytics for your site. Let‘s look at how to use the powerful Fathom dashboard next.

Viewing Website Analytics with the Fathom Dashboard

Once Fathom Lite is tracking your website, all your analytics data will be viewable through the Fathom dashboard. This dashboard provides real-time analytics and insights into your visitors with a clean, focused UI.

Here are some of the key metrics and reports you‘ll have access to:

  • Real-time visitor counter – See current active visitors on your site updated in real time.

  • Traffic graphs – Graphs showing pageviews, unique visitors, and bounce rates over customisable time ranges.

  • Top pages – Pages with the most traffic ranked by number of views. Identify popular and underperforming pages.

  • Referrers – Top referral sources sending traffic like search, social, links.

  • Visitor maps – See website visitor locations on a map to understand geographic traffic.

  • Browser/OS data – Analytics on which browsers and operating systems visitors use to access your site.

  • Custom events – Configure and measure custom events like newsletter signups or video views.

Unlike Google Analytics, the Fathom dashboard is clean and straightforward, not overwhelming. It focuses on presenting the key website metrics you need to improve your site without complex reports.

Plus, the real-time nature of the data means you can watch visitor activity as it happens.

For example, if you‘re testing changes to your website or running a marketing campaign, you can monitor the impacts immediately rather than waiting until the next day like with Google Analytics.

Overall, Fathom Lite provides a smooth and easy analytics experience focused on privacy.

Conclusion

I hope this guide has shown you how powerful yet privacy-friendly website analytics can be for understanding your users and improving your online presence.

As technology enthusiasts, we should advocate for services like Fathom Lite that respect visitors‘ privacy while providing the data we need to build better websites.

Fathom Lite offers a lightweight yet feature-rich Google Analytics alternative that puts you in full control of your website‘s analytics.

The installation process on Linux servers provides transparency and ensures your data remains private. And the Fathom dashboard gives real-time insights without overwhelming reports.

So give Fathom Lite a try on your next project! I think you‘ll find it a great solution for ethical website analytics.

Have you used Fathom Lite or other analytics platforms before? I‘d love to hear your experiences in the comments below! Let me know if you have any other questions.

Happy tracking!

AlexisKestler

Written by Alexis Kestler

A female web designer and programmer - Now is a 36-year IT professional with over 15 years of experience living in NorCal. I enjoy keeping my feet wet in the world of technology through reading, working, and researching topics that pique my interest.