
TL;DR
A self-hosted analytics solution using GoatCounter was implemented to avoid bot inflation and enhance privacy. The setup on NixOS improved data accuracy and user interaction tracking.
✦ Why It Matters
Consider switching to GoatCounter for a lightweight, privacy-focused analytics solution that filters bot traffic.
Key Takeaways
Full Summary
In 2016, the author transitioned from Google Analytics to GoAccess for privacy reasons but faced issues with bot traffic inflating visitor numbers. To address this, they adopted GoatCounter, an open-source analytics platform that does not collect personal data, using a session identifier instead of IP addresses or cookies.
The implementation involved replacing the default JavaScript client with a custom function to filter out bots more effectively by requiring user interaction. A local proxy was set up on multiple web servers to enhance reliability.
GoatCounter's lightweight design, with a single binary and SQLite database, makes it an efficient choice for self-hosting. Alternatives like Umami and Plausible offer varying complexity for those seeking privacy-friendly analytics solutions.
Related