Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
In Analytics Last updated: August 23, 2023
Share on:
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

Having a website is a very exciting and powerful thing. It’s the equivalent of owning real estate but on the Internet. Once you have an active website, specific metrics will be crucial in helping you determine how well your website meets its intended objectives.

For instance, you might want to know how many people access your website, what they do once on the site, what content drives the most traffic to your website, where are most of your users located, and how most users find your website.

Answers to such questions provide invaluable information that can allow you to improve your website and content in order to better serve your users and generate more revenue for your business. Luckily, there’s an easy way to get answers to all these questions and more and also gain insights into the users of your website. The solution lies in web analytics tools like Fathom.

Woman and graphical illustration

Why We Need Website Analytics

Web analytics is the process of collecting, measuring, analyzing, and reporting website data that is concerned with the behaviors of visitors of a website and the overall performance of the website. Web analytics allows you to track and understand the behaviors of people accessing and interacting with your website.

What-is-Web-Analytics

Web analytics is crucial because it gives you data that can inform the content on your website and also how to improve the performance and user experience of your website. Web analytics is what allows you to make informed decisions as far as your website is concerned. 

For instance, if you’re running a website that publishes technical articles and you notice that most visitors to your website are coming to read Java-related articles, you might decide to focus more on Java articles as it is what drives traffic to your website.

From your web analytics, if you notice most visitors to your website access it through their mobile phones, it makes sense to work to ensure your website works well on mobile devices.

Imagine you have an e-commerce website, and you notice that most users leave the website when they get to the payment process. This can tell you that probably, there are issues with your payment process that make it hard for users to complete the process, and thus, you need to improve on it.

If you do marketing across social media sites and you notice that most visitors are coming from Instagram, it makes sense to focus your marketing on Instagram.

Google-Analytics

A popular tool for web analytics is Google Analytics, which according to BusinessDIT, is used by 37.9 million websites, which represents 55.49 percent of all websites and 86 percent of websites using web analytics tools. Clearly, Google Analytics is a dominant player in web analytics. However, it has its shortcoming, some of which cannot be ignored.

For one, there are real privacy concerns with the use of Google Analytics. This is because Google uses it to aggressively collect and track the personal information of visitors to websites. This information is accessible by the United States government.

It is also worth noting that Google Analytics is not fully compliant with the General Data Protection Regulation(GDPR) and thus does not fully protect the data of European Union citizens from US surveillance laws.

Another shortcoming is that Google Analytics can be blocked by using ad blockers, and this might limit you from accessing your website metrics on users who use ad blockers. To avoid all these issues, a better alternative is Fathom for web analytics.

Fathom

YouTube video

Fathom is a simple, easy-to-use, feature-rich, and privacy-focused web analytics software. Unlike Google Analytics, Fathom is built with privacy in mind and thus does not compromise on the privacy of your visitors.

Additionally, Fathom offers faster loading times compared to google analytics. Fathom’s script is less than 2kb in size compared to Google Analytics’ script of over 20kb. This means that Fathom won’t affect the speed and performance of your website and is an excellent tool for Search Engine Optimization(SEO).

Fathom also offers real-time analytics such that if someone is viewing your website, that data immediately shows up on the dashboard. Fathom also offers more accurate analytics as it automatically blocks bots, crawlers, and DDoS attacks. A key feature of Fathom is privacy.

To achieve this, Fathom uses anonymous page view tracking that doesn’t collect or store personal data from your website’s visitors. This also means that your website visitors don’t need to accept cookies for Fathom to work.

Fathom complies with the GDPR, CCPA, ePrivacy, and PECR data laws, among many others, and does not sell data from visitors on your website.

Fathom comes in two versions, Fathom Lite, which is a free and open-source and self-hosted version, and Fathom Analytics, which is their paid-for-version with a lot more features and details for web analytics and privacy law compliance. Fathom Analytics is hosted on Fathom servers.

While new features are no longer being added to Fathom Lite, it still enjoys long-term support, and any bugs that arise in the software are fixed. To set up Fathom for your web analytics, this article will focus on using the free and open-source version of Fathom, Fathom Lite.

How to Install Fathom Lite

To install Fathom Lite, follow the following steps:

1. Navigate to Fathom Lite Releases and download the latest Fathom-lite release that suits your processor’s architecture.

To determine the architecture of your machine, open the terminal and execute the following command:

lscpu

The result is shown below:

cpu-architecture

In my case, my CPU architecture is x86_64 which is also known as amd64. Therefore I will download the amd64 release as shown below:

fathom-lite-release

2. Navigate to the directory where the file was downloaded and execute the following command

tar -C /usr/local/bin -xzf fathom_$VERSION_$OS_$ARCH.tar.gz
chmod +x /usr/local/bin/fathom

Replace $VERSION, $OS, & $ARCH with the appropriate values of the fathom lite version, os of your machine and its architecture as shown below:

sudo tar -C /usr/local/bin -xzf fathom_1.3.1_linux_amd64.tar.gz
chmod +x /usr/local/bin/fathom

Provide your password when prompted and press Enter.

3. Confirm fathom has been properly installed by running the following command

fathom --version

If properly installed, you’ll get back the version number of the installed version as shown below:

fathom-version-number

4. Next, we need to register a user with Fathom Lite. For this, navigate to the location where your .env file for your website is located the execute the following command

fathom user add --email="john@email.com" --password="strong-password"

Replace the email with your correct email and set a strong password to use with Fathom Lite. Once successful, you’ll get a screen telling you a user was successfully created as shown below.

Create-User-Fathom

5. In case you don’t have NGiNX installed on your machine, install it using the following command. NGiNX is a popular web server, and it simplifies running multiple sites from the same server.

sudo apt install nginx

Provide your password when prompted and press enter to install nginx. You can confirm nginx has been successfully installed by executing the following command:

nginx -v

If successfully installed, you’ll get the version number of NGINX that has just been installed.

6. Execute the following command to create a new file in /etc/nginx/sites-enabled called my-fathom-site. First, navigate to /etc/nginx/sites-enabled by executing

cd /etc/nginx/sites-enabled

then execute the following command to create a my-fathom-site file. You can give this file any name you want.

sudo touch my-fathom-site

7. Open the file in the nano editor with enhanced permissions by executing

sudo nano my-fathom-site

8. Copy the following code and paste it into the file. To paste in the terminal, press CTRL + SHIFT + V. You can edit the server_name to be the name of your website

server {
	server_name my-fathom-site.com;

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

9. Press CTRL + O to write out and save the changes.

Save-Nginx-File

After writing to the file and saving it, press CTRL + X to exit the nano editor.

10. In the terminal, execute the following command to test your NGINX configuration

sudo nginx -t
nginx-test-configuration

In case the configuration is successful, you should get the screen shown above.

11. Enter the following command to reload NGINX

sudo service nginx reload

12. Navigate back to the folder you had your .env file and execute the following command to start the fathom server as shown below

fathom server
start-fathom-server

13. The next step is now setting up Fathom Lite to automatically start upon reboot. Open a new terminal window and execute the following command to navigate to the system directory

cd /etc/systemd/system

14. Execute. Replace my-fathom-site with the name of the site you used.

sudo touch my-fathom-site.service

15. Open my-fathom-site.service using the nano editor by executing

sudo nano my-fathom-site.service

16. Paste the following code in the open file

[Unit]
Description=Starts the fathom server
Requires=network.target
After=network.target

[Service]
Type=simple
User=$USER
Restart=always
RestartSec=3
WorkingDirectory=/home/$USER/my-fathom-site
ExecStart=/usr/local/bin/fathom server

[Install]
WantedBy=multi-user.target

Replace $USER with the user name of your computer. In case you don’t know your user name, execute

cd /home

The execute ls, the file name displayed is your user name.

In the WorkingDirectory section of the code above, replace the path with a path to the file containing the .env file for your site. In my case, the final code that I pasted into my-fathom-site.service looks like this:

Screenshot-from-2023-08-22-15-12-32

Press CTRL + O to save the file, then CTRL + X to exit the nano editor.

17. Navigate to the file where your .env file is and execute the following to reload the Systemd configuration

sudo systemctl daemon-reload

18. Enable the service so that Fathom is automatically started whenever the system boots by executing

sudo systemctl enable my-fathom-site

19. Manually start your Fathom web server by executing

sudo systemctl start my-fathom-site

20. Open your browser and enter localhost:8080. You should see such a screen:

Fathom-Login

Enter the email address and password you provided in step 4, which was registering a user with Fathom-lite.

21. Enter the name of the site you want to track, then click Create Site

Site-to-track-fathom

22. You’ll then be provided with a script you need to add to your website for Fathom to start tracking the site. Copy the code to the header section of your website to start getting live web analytics of your website. All the analytics will be shown on the dashboard opened on localhost:8080

fathom-code

Installing Fathom Lite on your own without any prior experience working with Linux can be a challenging and long-winded process.

However, you can avoid all this by installing Fathom Analytics from DigitalOcean MarketPlace. The process is much shorter because you don’t have to set up the Fathom server and make lots of configurations yourself.

All you have to do is simply create a Fathom Analytics Droplet, and you’ll access a one-click solution for your web analytic needs. Consider installing Fathom Analytics from DigitalOcean Marketplace for a stress-free installation process.

Conclusion

As internet users, privacy is very important. As a website owner, as much analytics are important in decision-making for your website and business, the analytics should not be gathered at the expense of the privacy of your visitors.

To guarantee the privacy of the visitors to your website, consider using tools such as Fathom Lite, which are fully GDPR compliant and don’t compromise the security of your visitors. Additionally, Fathom offers better loading times and is not blocked by many ad blockers, as is the case with Google Analytics.

  • Collins Kariuki
    Author
    Collins Kariuki is a software developer and technical writer for Geekflare. He has over four years experience in software development, a background in Computer Science and has also written for Argot, Daily Nation and the Business Daily Newspaper.
  • Narendra Mohan Mittal
    Editor

    Narendra Mohan Mittal is a Senior Digital Branding Strategist and Content Editor with over 12 years of versatile experience. He holds an M-Tech (Gold Medalist) and B-Tech (Gold Medalist) in Computer Science & Engineering.


    read more
Thanks to our Sponsors
More great readings on Analytics
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Monday.com is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.
    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder