DEV Community

Cover image for How I Accidentally Built My Own Mixpanel Alternative
Carl-Gerhard Lindesvärd
Carl-Gerhard Lindesvärd

Posted on

How I Accidentally Built My Own Mixpanel Alternative

Two years ago, around September 2023, I was working on one of my side projects. It wasn’t making money, but I wanted to understand how people were using it, so I used Mixpanel.

At first it was fine. We were part of Mixpanel’s startup program, which made it free to use. That app had maybe 250–500k events a month, not much. Then the program ended. Suddenly the bill jumped to $300–400 a month.

That was a bit painful for a project that had 10k active users a month

Why I didn’t just switch tools

I looked around. PostHog looked great, but it felt too advanced and heavy for what I needed. Plausible and Umami were cool for web analytics, but they didn’t support real product analytics, and custom events were behind enterprise plans.

What I really wanted was something in between.

  • The simplicity of Plausible.
  • The depth of Mixpanel.
  • And the freedom of open source.

That combination didn’t exist.

The moment it clicked

One evening I pulled data from my Postgres database and made a small chart just for fun.
When I saw that chart update with live data, I realized I could actually build the kind of reporting tool Mixpanel had.

That was the moment OpenPanel started.

I figured if I was already logging events, why not build something that gives me full control? At first it was just an experiment. But after a while, I saw the bigger picture. If I wanted proper product analytics, I’d also need to track web data. So I started combining the two.

Product analytics plus web analytics in one self-hosted stack.

Today's product analytics

The early stack

The first version was a mix of Next.js, Node, and Postgres. It wasn’t fancy, but it worked. I could track events, view them, and draw basic charts.

Postgres handled things fine until the event count grew. Once it hit millions, queries started slowing down. That’s when I moved to ClickHouse and kept Postgres for application data.

It was the first time OpenPanel started to feel like a real analytics product.

The hard parts

I’ve honestly given up on this project at least a hundred times.

Building an open source platform that handles real data is hard. You fight with performance, storage, schemas, queues, and migrations. Every change has ripple effects.

And then there’s the self-hosting part. You can’t just ship code. You have to think about Docker setups, upgrade paths, environment variables, and all the edge cases that don’t show up in your own environment.

It’s a lot. But every time I get a message from someone who deployed it successfully or a paying customer saying “this saved us thousands,” it’s worth it. That feeling keeps me going.

How it’s going now

Fast forward to today — OpenPanel handles around 100 million events per month and around 200 self-hosted instance (what we know about).

Some of our bigger customers have actually moved to self-hosting to save costs, which is exactly what I wanted. Open source analytics should give you control and options, not lock you in.

The product has come a long way since that first chart I created.

It’s now a complete analytics suite that combines product analytics and web analytics in one place, with no cookies, no user tracking, and full self-hosting support.

You can think of it as a Mixpanel alternative that’s simple like Plausible but powerful enough for real apps.

The epic real time view

Why I’m still building it

OpenPanel started as a personal project because I couldn’t find what I wanted. Now it’s turning into something bigger.

The goal hasn’t changed though. I want to make analytics tools that are simple, transparent, and don’t punish you for growing.

If you’ve ever been frustrated by pricing tiers, missing features, or vendor lock-in, you’ll get it.

That’s why I built OpenPanel, mainly for myself but now its available for anyone. Want to find out more, visit our website https://openpanel.dev

Top comments (4)

Collapse
 
lemii_ profile image
Lemmi

Looks great! Are you using Clickhouse as your data warehouse?

Collapse
 
lindesvard profile image
Carl-Gerhard Lindesvärd

Thanks @lemii_ and yes, I use Clickhouse to store analytics data and postgres for application data.

Collapse
 
lemii_ profile image
Lemmi

is it easy to work with?

Thread Thread
 
lindesvard profile image
Carl-Gerhard Lindesvärd

Easy is wrong phrasing tbh, but you will love my next article 🤝 Its easy when it works