PI

Pirsch

Go library and API for privacy-friendly, cookie-free web analytics

Web Analytics ★ 1k stars Medium setup AGPL-3.0

Pirsch is a Go library for server-side, cookie-free web analytics. The open-source repository provides the tracking and statistics code you embed in your own application; the hosted pirsch.io dashboard is a separate commercial product.

Key features

  • Cookie-free tracking
  • No personal data collected
  • Lightweight tracking script
  • Go analytics engine

Pros & cons

Strengths

  • GDPR-friendly by design
  • Fast and efficient

Trade-offs

  • Self-hosting needs assembly
  • Smaller ecosystem

Pirsch replaces

Last reviewed Sep 13, 2026 · 809 words

The Pirsch repository on GitHub is a Go library, not an analytics server. If you arrived expecting to docker compose up a cookie-free Google Analytics replacement with a dashboard, the 1,032-star pirsch-analytics/pirsch repo will not give you one: it gives you a tracker package you import into your own Go application, which writes page views into a ClickHouse database and leaves the reporting to you. The polished dashboard at pirsch.io is the company's commercial product built on that library. Neither half is a bad thing, but the catalogue's "self-hosting needs assembly" is understating it.

What is actually in the repository

The library does the hard, privacy-sensitive part of web analytics well. You hand it an HTTP request, it fingerprints the visitor from IP, user agent and a rotating daily salt rather than a cookie, filters out bots, resolves the referrer and geographic region, and stores a hit. Sessions are stitched server-side, there is nothing for a consent banner to cover, and it ships as one AGPL-3.0 Go module. Storage moved to ClickHouse in the second major version, which is fast for the aggregate queries analytics needs but adds a database that most homelabs do not otherwise run. Expect the 256 MB figure in the catalogue to cover the tracker in your app; ClickHouse itself wants more.

There is no login, no chart and no HTML anywhere in the repo. The read side is a Go API for queries (visitors by day, top pages, referrers, countries, UTM parameters) that you call from your own code.

Who this is for

Go developers who already run a Go web application and want first-party analytics inside it without a third-party script. Embedding the tracker in your HTTP middleware means every page view is recorded at the server with zero client-side JavaScript, which also makes it immune to ad blockers. That is a real advantage for a SaaS backend, an internal tool or a documentation site written in Go, and it is where I have seen Pirsch used in earnest. You get to design exactly the report you want, and you own the ClickHouse data.

If that description does not match you, the assembly required is a whole product: a query layer, a UI, auth, and retention policies. That is more work than anyone should do to see a traffic graph.

The hosted product versus running it yourself

Pirsch the company sells the dashboard as a subscription starting at a few euros a month at last check, with the same cookie-free approach and a lightweight script for non-Go sites. Self-hosting the full dashboard is offered to larger plans as an on-premise arrangement rather than as an open-source download. That is a legitimate business model, and the library being open lets you verify what the tracker collects, but it means "open-source Pirsch" and "Pirsch that shows me charts" are different things. The GDPR-friendly design carries over to both; the self-hosting story does not.

For a dashboard, run one of the bigger projects

The analytics category has three projects that are what people think Pirsch is. Plausible is the closest in spirit: cookie-free, one script, a clean dashboard, and its Community Edition self-hosts with a compose file (it also uses ClickHouse, so the database cost is the same). Umami is lighter, runs on PostgreSQL, and is the easier install for a homelab. GoatCounter is a single Go binary with SQLite that runs on almost nothing. The Plausible vs Umami comparison covers the split between the two biggest; either is a better answer to "replace Google Analytics" than building on the Pirsch library.

Where the library still wins

Two cases. First, server-side tracking where you cannot or will not ship JavaScript: an API, a file download endpoint, a site with strict CSP. Plausible and Umami both have server-side event APIs, but Pirsch's middleware integration is tighter if the app is Go. Second, when you want the data in ClickHouse for your own queries anyway, say to join page views with application events. In both cases you are writing code, and you should know that going in.

What I'd do

If you write Go and want analytics inside your own application, import the Pirsch library, run ClickHouse alongside it, and build the two or three reports you actually read. Everyone else should not touch the repo: install Umami if you want the smallest self-hosted dashboard, Plausible CE if you want the nicest, and pay pirsch.io if you like their approach and would rather not operate anything. Treat the "self-hosted Pirsch" label as a description of a library, because that is what it is.

Compare Pirsch

19 head-to-head comparisons.

Similar web analytics apps