BLOG POST

Me and my friend, analytics

We’re good buds.

Kevin Wang

A few days ago, Bryce sent me Dax's video about Cloudflare Pipelines. Ironically I had saw it on X earlier and doom-scrolled right past it. Silly me. So, I gave it another watch. Neat, more stuff on my stack of things to check out.

I will circle back to this...

I’ve been itching, for quite some time, to set up my own analytics for my website; effectively something that isn‘t Google Analytics. Something where I could dump arbitrary events — OpenTelemetry-like data perhaps — and also be able to query it in, ideally with SQL, but not some gnarly BigQuery SQL dialect; no thanks.

ClickHouse#

I am partial to ClickHouse, after having worked with it for over a year now. I’ve simultaneously grown to love it and have been spoiled by it. And when you’ve invested a decent amount of time and energy into grinding at something, you get a little reluctant to let go of it, right? I think so.

The bulk of my experience with ClickHouse took place around July 2025, when frontier models like GPT 5.0 still kind of sucked at ClickHouse. In fact, I don’t remember “agents” or “harnesses” being super hot yet either. So I got to spend a decent amount of time, pretty hands-on with it, as opposed to delegating most of it to an agent to figure out.

I built the service that aggregates the user retention and churn analytics that you see on the Clerk dashboard overview. A series of materialized views enable the final query to execute fast, under a second, for tenants with over tens of millions of DAU’s.

Clerk dashboard; User analytics for one of my apps.

However, I just cannot justify paying for ClickHouse for my personal website. Their cheapest cloud offering starts at $161/month for an always-on cluster; Way too expensive. I also won’t go into the embarrassing number of times I’ve fired off desperated cries to GPT 5.4, 5.5, and 5.6 in hopes of some magically-simple way to self-host ClickHouse as cheaply as possible, only to arrive at the conclusion of, ”Ain’t nobody got time fo dat...”

Personal analytics#

Ok, so, what can I use for my humble little website that is low-touch, and cheap?

Here is what I have tried or considered:

TinyBird: Basically gives you a full pipeline — ingestion endpoint, storage, and retrieval. Despite being a very cool product, it has always felt a bit too abstracted to me. Cool to play with, but felt like there was too much magic going on, and never really stuck with me. Their events API was always a killer feature though. Ingestion is challenging to get right.

Workers Analytics Engine by CloudFlare: This is another flavor of ClickHouse, basically, but also felt slightly too awkward for my taste. This would put the onus on me to handle write the ingestion logic — buffering, batching, error handling — which is something I was not super interested in rebuilding just for my website.

$5 Postgres + TimescaleDB on Planetscale: Yes, I thought about this one... Everyone’s always touting, ”JuSt UsE PoStGrEs“, which to be fair, I’m a fan of. Boring, battle-tested tech is the best. And $5 is quite cheap too. But for analytics, it’s just not the right tool and not what I wanted to settle on. There was even a time, now lost to history, where the Clerk dashboard's daily active users view was powered by Postgres & HyperLogLog, and it would still timeout for large tenants. Enjoy that lore nugget.

Cloudflare Pipelines#

Alas, we arrive back at the top: Cloudflare Pipelines

Everything about them is perfect for my personal website usage.

  • They’re pretty cheap: unlimited ingress, and free 50gb of both SQL transforms and sink egress. Who doesn’t love $free.99?
  • They’re terraform-able: Who doesn’t appreciate infrastructure-as-code?

Am I sounding like an advertisement yet?

The biggest feature for me is the simple HTTPS endpoint for ingestion. A quick test with hey showed 100% successful responses at 10k requests and 80 concurrent connections. Nice.

>_

A close second is the ease of querying the final data that sits in an R2 bucket, via SQL. These queries are kind of slow, but that’s totally acceptible for my use case.

Overall, it’s a nice package that delivers simplicity while taking care of an otherwise complex technical problem. Great value, I’d say.

Here’s the overview of the analytics for this site.

A mermaid diagram image

You can see the querying side of things at /analytics.