# GoatCounter — Privacy-Friendly Open Source Web Analytics > GoatCounter is a lightweight, privacy-respecting web analytics tool written in Go. It tracks page views without cookies, fingerprinting, or personal data collection, and can be self-hosted as a single binary. ## Install Save in your project root: # GoatCounter — Privacy-Friendly Open Source Web Analytics ## Quick Use ```bash # Download the latest release binary wget https://github.com/arp242/goatcounter/releases/latest/download/goatcounter-linux-amd64.gz gunzip goatcounter-linux-amd64.gz && chmod +x goatcounter-linux-amd64 # Start the server ./goatcounter-linux-amd64 serve -listen :8080 -tls none ``` ## Introduction GoatCounter provides web analytics that respect visitor privacy. It does not use cookies, does not collect personal data, and does not require a consent banner. The result is a simple, fast dashboard showing the traffic metrics that matter. ## What GoatCounter Does - Counts page views, unique visits, referrers, and browser/OS statistics - Works without cookies, localStorage, or fingerprinting - Provides a dashboard with daily, weekly, and monthly traffic breakdowns - Tracks campaigns and UTM parameters for marketing attribution - Exports data as CSV for offline analysis ## Architecture Overview GoatCounter is a single Go binary with an embedded SQLite database. It serves both the tracking endpoint and the analytics dashboard. The tracking script is a 1.5 KB JavaScript snippet that sends a lightweight beacon to the server on each page load. No personal data is stored — visit counts are aggregated by day and path. For higher-traffic sites, PostgreSQL can replace SQLite as the storage backend. ## Self-Hosting & Configuration - Run the single binary on any Linux, macOS, or Windows system - Add the tracking script to your site with one HTML tag - Configure automatic HTTPS with Let's Encrypt or run behind a reverse proxy - Switch from SQLite to PostgreSQL by setting a database connection string - Set up multiple sites under one installation with separate dashboards ## Key Features - No cookies and no personal data storage — fully GDPR-compliant by design - Lightweight tracking script under 1.5 KB with no external dependencies - API access for reading analytics data programmatically - Configurable public or private dashboards - Built-in bot and crawler filtering to keep stats accurate ## Comparison with Similar Tools - **Plausible Analytics** — similar privacy focus with a polished SaaS UI; GoatCounter is simpler and can run as a single binary with SQLite - **Umami** — privacy-friendly analytics with a modern dashboard; GoatCounter is lighter and requires fewer dependencies - **Matomo** — full-featured analytics suite with PHP and MySQL; GoatCounter is much simpler and avoids cookie-based tracking - **Fathom** — privacy-first analytics as a commercial SaaS; GoatCounter is fully open source and free to self-host - **Google Analytics** — comprehensive but relies on cookies and personal data; GoatCounter provides essential metrics without privacy concerns ## FAQ **Q: Do I need a cookie consent banner with GoatCounter?** A: No. GoatCounter does not use cookies or collect personal data, so consent banners are not needed under GDPR or similar regulations. **Q: How accurate are the analytics without cookies?** A: GoatCounter counts page loads and uses a hash of the IP address plus date to estimate unique visitors. This provides useful aggregate data without tracking individuals. **Q: Can I use GoatCounter with a static site?** A: Yes. The tracking script works with any HTML page regardless of the hosting platform — static sites, SPAs, and server-rendered pages all work. **Q: Is there a hosted version?** A: Yes. The author runs a free hosted service at goatcounter.com for small sites, or you can self-host for full control. ## Sources - https://github.com/arp242/goatcounter - https://www.goatcounter.com/ --- Source: https://tokrepo.com/en/workflows/134a0dec-4126-11f1-9bc6-00163e2b0d79 Author: AI Open Source