By Adam Moore

I Built My Own Page-View Counter

I already had Google Analytics and Clarity. I wanted one small place for the sites that matter, built for me and my bots.

October 26, 2026

I run quite a few sites. For a long time I still leaned on the usual tools when I cared about traffic. Google Analytics on some of them. Microsoft Clarity when I wanted session replay. Those work. They're also overkill for most of my projects, and they never gave me one simple place to see everything together the way I wanted.

So I kept wondering about a smaller thing. A page-view counter that was mine. Something light enough that I wouldn't mind dropping it on a site, and central enough that I could glance across the ones that mattered without hopping between dashboards.

I'd been talking about building that for a while. Not with one bot either. Grok, Grok Build, ChatGPT, even here with Grok Bot. Same conversation over and over. I'd float building something small for my own sites, and the chat would push toward a service that was already built. Sign up. Drop in their script. Done.

I never pulled the trigger on one of those. I knew I could do what I wanted, and I knew I wanted it personal. How it looked. How it felt. Just mine. And I wanted my bots to be able to look at the numbers the same way I do, without me babysitting another vendor account.

Let's build this

So I finally stopped opening the chat with "should I build my own?" I said let's build this.

That was the whole shift. Once I wasn't asking for permission, the agents stopped selling me on someone else's product and started helping me make mine. One owner. My sites. My data. No marketing tour, no shared tenancy, no feature matrix I didn't ask for.

What got built

v1 merged on October 17. TanStack Start, React, Vite, Drizzle. Better Auth with a single owner login, which is me. SQLite in WAL mode, with Litestream pushing backups to DigitalOcean Spaces.

It's small on purpose. I don't need multi-tenant analytics. I need a place that records hits from a script tag and shows me what people actually open. SQLite keeps the whole thing on one machine. Litestream means I'm not inventing my own backup story. One login means I'm not building an invite system for a product that will never have a second user.

The boring bits turned out to be the ones I cared about later. Unknown site slugs and bad origins get an empty 204, so nobody can poke around and learn which sites exist. Bodies bigger than 8 KB get dropped. There are per-IP and per-site limits, and a ceiling of 500 new paths a day so junk URLs can't bloat the table. None of that is exciting. All of it is why I sleep fine leaving the endpoint public.

Deploy on push landed around the same time. CI runs lint, typecheck, tests, build, and a health check, then SSHs to the droplet with a pinned host key.

One script tag, then another

Rollout was the fun part. One script tag per site, and an add-site flow that issues the server key once so the next one is easy.

I run quite a few sites, but I've only put tracking on a small handful so far. I started with four of my most important ones, then added a new one. The system is set up so I can keep dropping sites in without turning it into a project every time.

No migration. No waiting on a vendor. Just paste the tag and ship.

I don't have a big traffic story to tell yet. That's kind of the point. I finally have a counter that answers to me, stores data I own, and looks and feels the way I wanted. My bots can see it too, which is already better for how I work. I'm curious what the numbers will show once they've had a little time to pile up.

I didn't ask whether I should build it. I said let's build this. And now I have it.

Read Next

More field notes

October 18, 2026

My App Said It Failed. It Didn't.

A slow AI call, a browser that gave up too early, and a handful of bots that filed the bug and got it fixed before lunch.

Read analysis

October 17, 2026

I Shipped a Work Fix From My Phone

15+ years into web dev, a new workflow still blew my mind: Grok Bot on my phone driving Claude Code on my work computer to file the ticket, make the fix, and open the PR while I was out of the office.

Read analysis

October 17, 2026

Agents Need APIs, Not Spreadsheets

My assistant bots were working out of a Google Sheet. Then one of them basically asked for a real feature. The pattern I keep landing on: give agents real APIs plus a skill doc.

Read analysis