One counter for twenty little sites
I have a webspace full of small projects. Two of them had grown their own private hit counters; the rest had nothing at all, so I had no idea whether anybody had ever opened them. The obvious fix is to sign up for something, and I did not want to sign twenty hobby pages up for anything — not for the price, and not for the part where a third party ends up holding a log of who visited my own site.
So: one endpoint on the webspace that already exists. A collector that takes a
beacon and appends to a JSON store on disk. A 92-line script that every page includes
as a single line before </body>. One dashboard that reads the store
behind an admin key, which is injected at deploy time and never committed.
Adding a site is four steps: put the slug in the collector's allow-list, add the one script line to the page, add a title and URL to the dashboard, deploy. A project on a different origin — a subdomain, an itch page — also needs its origin listed, or the browser drops the beacon before it ever leaves.
It is not a competitor to anything. It cannot tell you where someone came from or what they did next, and it deliberately does not try. It answers exactly one question, which is the only one I actually had: did anyone open this, and when.
The honest caveat, which is the same caveat every self-hosted counter has: it cannot tell a stranger from me on my own phone. A number going up is not the same as somebody finding it. That distinction still has to be made by hand, from a comment or a reply or a referral I did not send myself.