Added some Logging
I just added a tiny, privacy‑friendly “pageview counter” to this blog that runs for free, doesn’t use Google Analytics, and avoids collecting personal data.
What problem this solves
Most analytics tools track a lot more than many small sites need: they set cookies, profile visitors, and phone home to big platforms just to answer basic questions like “Which pages are people reading?” and “Is anyone visiting this thing?” The goal here was different: count visits and see which pages get attention, without building dossiers on readers or depending on gross ad‑tech companies.
What I built instead
A tiny web service (hosted on Deno Deploy) that receives a simple “someone/something viewed this page” message whenever a page on the site loads.
The service is a very small snippet of JavaScript added to the blog’s template that sends just three pieces of information:
-
Which page was viewed (the URL path)
-
The page title
-
Where the visitor came from on the site (the referrer)
The service does not store IP addresses, cookies, or unique identifiers—only high‑level information that’s useful for understanding traffic, not tracking people.
How it works behind the scenes
When someone opens a page on the site, their browser quietly makes a background request to the analytics service saying “Page /blog/archive/ was viewed.” The service checks that the request comes from a web page, updates an in‑memory counter for that page, and writes a brief log line (timestamp, path, title, referrer, and browser type).
What makes it privacy‑respecting
No cookies and no fingerprinting. The system doesn’t try to recognize or follow a person across visits; it only counts pageviews.
Minimal data
It records just enough to answer “what is being read?” rather than “who is reading it?”.
Why this is a good fit for a personal blog
For a small site or personal blog with no commericial interests whatsoever, the interesting questions are about content, not people: which posts resonate, which pages nobody sees, and whether the site is still alive in the eyes of readers. This setup answers those questions with a tiny, understandable, and host‑agnostic piece of plumbing - no dashboards, no trackers, and no dependence on ad‑network analytics.