Meta 1: Data Is King, and I Had None
/ 10 min read
Table of Contents
Data is king. I say it at work, I say it to my agents, and on the fourth of November I went looking for the blog’s numbers and found there weren’t any. Not low numbers. No numbers. The site had been live for seven months, and I could not have told you whether a single person had read a single post.
So the Friday series starts here. Mondays are Orrery, Wednesdays are the homelab, and Fridays are about the blog itself: how it gets built, how it gets shipped, and what its readers actually do. The first thing worth saying about that last part is that I have no idea.
Surely Somebody Was Counting
The cadence went to three posts a week at the end of October. Counting this one, there are seven posts on the site, and four of them landed in the last ten days. That’s a lot of writing to send into the dark, and I’d been doing it on a comfortable assumption: it’s a static site on GitHub Pages, behind a custom domain. A company that size must be counting something.
It isn’t. GitHub Pages has no traffic dashboard, no log export, and nothing in the API. The live site answers every
request with Server: GitHub.com, and that header is the full extent of what GitHub will tell me about it.
The site itself wasn’t counting either. The theme’s head component has no tracker in it, so nothing is sent anywhere.
The part that made me laugh was the pipeline. The workflow that builds the site injects a variable called
PUBLIC_UMAMI_ID into every build, next to a solemn comment about never hardcoding analytics IDs in YAML. The planning
doc from the scaffold says to set it to a placeholder if you aren’t using analytics yet, then “update your Astro layout
to check for this value before rendering the analytics script”. The placeholder went in on the sixth of April. The
layout change never did. For seven months, every build has dutifully handed the word disabled to a site that wouldn’t
have known what to do with a real value anyway. (The header also calls the ID a secret. It isn’t. A website ID sits in
the page source of every site that uses one. You only notice that kind of thing when you finally read the file.)
The blog’s very first post is about a pipeline that reported “succeeded with errors”. It turns out mine had been doing exactly that about analytics since day one. The errors just weren’t loud enough to reach the log.
Why I Looked Now
The homelab has a control centre called Hlidskjalf, after the high seat in Asgard from which Odin can see everything. It’s a small Go and Svelte app, and it’s strictly read-only: it shows the cluster, the CI forge, the apps and the edge, and changes none of them. Its data readers are called ravens and its sections are called realms, because of course they are.
I was sketching the next realm and asked myself an obvious question. The blog is the one thing I publish to other people, so what can the control centre show me about it? After the audit above, the answer was “which posts exist, and whether the build is green”. Everything about readers was blank. That’s what turned “I should add analytics sometime” into a decision record with a date on it.
The record proposes a fifth realm for the blog, called Vanaheim. The Vanir are the gods of the harvest and of things that grow outside Asgard’s walls, and the blog is the one crop the lab produces. Vanaheim gets three ravens. One reads post front matter and the content calendar from the repo. One probes the live site and its RSS feed. The third reads traffic. The first two need no new infrastructure, so they ship first. The third is what this post is about.
Four Ways to Count
I weighed four options that same day and wrote them down before I could talk myself out of any.
Cloudflare Web Analytics was the least work: nothing to run, and a query API. But the blog’s DNS lives at the registrar, not on Cloudflare, so I’d have to either move the zone or settle for the standalone beacon and a much thinner API than the self-hosted tools offer. I didn’t want to move the blog’s DNS just to get a page-view count.
Hosted GoatCounter was the simplest of the four. A third party would hold the data, which I could live with for a blog. But the lab already runs PostgreSQL on the cluster, so running my own would only cost one small database.
Self-hosted Plausible needs ClickHouse as well as PostgreSQL. That’s too heavy for a Raspberry Pi 5 with eight gigabytes of RAM, and the lab is made of Raspberry Pi 5s with eight gigabytes of RAM.
Self-hosted Umami is a single Next.js process on PostgreSQL. It’s published for ARM64, it doesn’t use cookies, and it has a read API behind API keys, so a raven can pull aggregates out of it. And the pipeline had been reserving a variable named after it since April, so apparently I’d picked it once already and then forgotten.
Umami won, though not by much. The lab already has the database, the hardware is small, and the option I’d half-chosen in April still fit.
One Collector, Two Names
One constraint shaped everything else. The collector has to be reachable from readers’ browsers on the public internet, and the lab exposes nothing to the internet except through a Cloudflare tunnel. A tunnel hostname needs a domain whose DNS is on Cloudflare, and the blog’s domain isn’t. So the collector gets a name under a domain I do have there, and the blog loads the tracker from that.
That leaves Umami with two names, exposed very differently. The admin UI lives on a lab hostname, behind the cluster’s
ingress and the lab’s wildcard certificate. It’s reachable from the lab network and over Tailscale, and nowhere else.
The public name reaches the cluster through the tunnel, and its ingress matches exactly two paths, /script.js and
/api/send. Anything else on that name goes nowhere. The test before merging is blunt: does the public root return a
404 from the ingress? If the admin UI ever answers on the public name, something is badly wrong.
On the blog side, the change is one line in the head component: a deferred script tag pointing at the public name, with the website ID read from that long-neglected variable. It only renders when the variable is set, so local builds load nothing.
There’s a cost, and I accepted it. Because the tracker loads from a domain other than the blog’s own, ad blockers will catch it more often than they would a first-party script. Umami can serve its script and collect endpoint under different names to dodge some of that, but doing so would break the two-path ingress, so those settings stay at their defaults until I’ve measured how much blocking actually happens. The alternative was moving the blog onto Cloudflare so the collector could be first-party, and that costs more than an undercount does. My numbers will be low. I know that going in, and now you do too.
What It Will and Won’t Collect
“I added analytics” can mean almost anything, so here’s exactly what this means.
Umami doesn’t use cookies, but that isn’t the same as collecting nothing. Its own admin UI will happily break visits down by country and device. So the line I drew is about what leaves Umami. The raven reads aggregates only: visitors and views for today, the last seven days and the last thirty, top posts, top referrers, and how many people are on the site right now. It never calls the session endpoints, and the control centre shows no country, device or per-visitor breakdown. That isn’t a setting that could drift later. It’s the shape of the data the raven stores, and it’s written into the decision record.
Umami makes no compliance claims about itself. Whether a cookieless page-view count owes anyone a notice is my call as the operator, and my call is that the blog should say what it collects. There’s no privacy page on the site today, which is its own small embarrassment. The plan has a line for one: cookieless page-view counts, self-hosted, no third party.
Where It Stood on the Fourth
When I wrote this, on the fourth of November, nothing was deployed. The decision was recorded and the manifests were specified, and that was all. Three things were still open.
The first was Umami’s memory use on a Pi. It isn’t documented, so the spec sets a request and a limit by guesswork, with a note to correct them after a day of running. The readiness probe path is a guess too, read from the image rather than from any documentation. I’d rather write “unverified” next to a number than pretend I measured it.
The second was the blog repo itself, which had to move first. The control centre reads GitHub through a GitHub App that can only be installed on my organization, and the blog lived under my personal account. Moving the repo was cheaper than teaching the App about a second installation for one repository. What I didn’t know was whether GitHub Pages and the custom domain would survive the transfer.
That one answered itself the same afternoon. The repo moved while I was drafting this, and the site still answers on its
domain. The pipeline came through too: the next three merges to main, all from the repo’s new home, built and
deployed green within the hour.
The third was the order of work, which is deliberately boring. First the realm, with the two ravens that need no new infrastructure. Then Umami on the cluster. Then the tracker in the blog. Then the traffic raven, once there’s something to read. Each step is small enough to land in a day, and none of them is this post.
What I’m Taking From It
I assumed a host that big would have a usage page. It does have one for Actions minutes, as the Orrery series found out the hard way. It has nothing for Pages traffic. “Surely somebody is counting” turned out not to be a data strategy.
A placeholder is a promise with no date on it. The disabled value went in with a note saying what to do next, and the
note sat in a file nobody re-read for seven months. If I’d made it fail loudly instead, I’d have numbers from April.
The privacy stance is easiest to decide before the first byte is collected. Writing “aggregates only, never sessions” into a decision record is easy. Walking it back after the dashboard has grown a map would not be.
And the status should be written honestly, including the part that’s nothing. Everything in this post from the two-name design onward is a plan. The only verified facts are the audit at the top, a 200 from the site after the move, and the green builds that followed. If I’d written “I added analytics” today, it would have been a lie with a plan attached.
Seven months blind, one decision record, an environment variable that finally has somewhere to go, and still zero data. Succeeded with errors.
Next in the series: the first week of numbers, once there are numbers.