How I Switched from Google Analytics to a Better Open Source Alternative
Tags: webdev, opensource, performance
Published: 2021-08-10 10:21:47

---
title: How I Switched from Google Analytics to a Better Open Source Alternative
published: true
description: I used to use Google analytics to monitor traffic on my web apps. Although, It served its purpose, there were some things I never liked about it.
tags: webdev, opensource, performance
//cover_image: https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80
---

>TL;DR  
>  
>I switched from Google analytics because of its flaws and I wrote a [guide](https://www.elvisduru.com/blog/how-to-self-host-plausible-analytics?utm_campaign=how-to-self-host-plausible&utm_source=Dev.to&utm_medium=social) that shows you how to self-host your own analytics solution that is a better alternative to Google analytics.

I used to use Google analytics to monitor traffic on my web apps. Although, It served its purpose, there were some things I never liked about:

1. I respect my user's privacy:By using Google Analytics, you’re sacrificing the privacy of your site visitors
2. I care about my users/visitors experience a lot:By using Google Analytics, you’re making the user experience on your site more inconvenient. To abide by the privacy regulations, you compromise your visitors experience by displaying annoying cookie banners and GDPR or CCPA consent notices. This is the case of many websites nowadays.
3. It slows down your website:After installing GA, my lightspeed performance test went from 96 to 81. If you're not above the 91 mark, then something's wrong. GA has a performance impact on the page weight and the loading time speed of websites that use it.
4. It was overkill for my use case:Google Analytics is overkill for most website owners. It’s a powerful but complex tool that can take time to understand and requires training.
5. I needed complete ownership and control over my website's analytics data
6. It's a Closed-source product and Google has way too much control of people's personal data. Google Analytics is installed on and is tracking website traffic on [85% of all websites](https://w3techs.com/technologies/history_overview/traffic_analysis). A majority of web traffic is tracked by a single company.
7. Avoiding Ad-blockersLet's face it, a lot of people use ad-blockers nowadays, which means the data fetched by Google Analytics affected. Their analytics script is blocked by many people who use adblockers such as the [uBlock Origin](https://github.com/gorhill/uBlock) and from users of privacy browsers such as Brave.

So, how did I solve this? I saw a tweet from [Uku Taht](https://twitter.com/ukutaht) where he talked about his new  open-source and transparent analytics tool called [Plausible](https://plausible.io/), I checked out their website, read the docs and I was amazed with the product. It solves every thing I mentioned in the above points! It's lightweight, open-sourced, no cookies and is fully compliant with GDPR, CCPA and PECR. The part that won me over was this note taken from their official docs:

>By using Plausible, you keep 100% ownership of your website data and you protect the privacy of your visitors at the same time. You can self-host Plausible on your own server.

More importantly, I was impressed by the part that said I can self-host Plausible on my own server. I've successfully installed Plausible on an extremely cheap Digital Ocean droplet, and I use it currently to monitor all the products I build. I have full control, my apps are blazing fast and my users are happy.

I wrote a comprehensive step-by-step guide on how you can self-host you own analytics tool. You can [give it a read](https://www.elvisduru.com/blog/how-to-self-host-plausible-analytics?utm_campaign=how-to-self-host-plausible&utm_source=Dev.to&utm_medium=social) if you want to migrate from Google Analytics just as I did.