How Plausible built a lightweight Google Analytics alternative
Plausible is an open source, cookie-free analytics tool run by a tiny bootstrapped team in the EU. Its stack is an Elixir and Phoenix monolith, with PostgreSQL for app data and ClickHouse for the stats, running on servers in Germany.
Stores and manages customer support conversations.
How they built it
One developer, a favorite stack
Uku Täht started Plausible alone in December 2018 and picked tools he already trusted: Elixir and Phoenix on the server, PostgreSQL for storage, Tailwind for styling and plain server-rendered pages. His argument was that fewer moving parts keep a small project fast and simple.
The early setup ran on Heroku, with Sentry for errors, Mailgun for email and Cloudflare in front. His one worry was whether Elixir could keep up with heavy traffic, and he admitted he would only find out by trying.
Every pageview went into a single PostgreSQL table, and the numbers were added up at query time. After the traffic spike of spring 2020, loading the demo dashboard could take more than 6 seconds. Täht's diagnosis was that a row-oriented database is not built for this kind of analytics query.
Instead of pre-aggregating the data, the team moved the stats to ClickHouse, a columnar database that keeps the raw events and still answers ad-hoc queries fast. The co-founders later said ClickHouse came out on top in both performance and features, and that it lets them serve customers with around 150 million pageviews a month.
By the time of a later interview, Plausible was handling 60 million pageviews a month on Elixir without trouble. Täht pointed to its strength with stateful work: active visitor sessions live in memory in a GenServer, so the app skips a database lookup on every event.
The hosting changed along the way. The team left Heroku for a DigitalOcean server running Docker, and today the visitor data sits on Hetzner servers in Germany, with Bunny in front for CDN, DNS and DDoS protection and UpCloud for database hosting.
The same codebase powers the paid cloud product and the free self-hosted edition on GitHub. The dashboard is a React app written in TypeScript, while the rest of the web app stays in Phoenix.
The list of vendors is short and mostly European-friendly: Paddle for payments, Postmark for email with open and link tracking turned off, Help Scout for support and Friendly Captcha on the sign-up and login pages. Anthropic is listed as an optional tool for drafting support replies and answering questions in the docs.