Michael Di Giacomi
All posts

Useful website analytics without tracking people

I want to know whether the things I write are finding an audience. I do not need a history of each reader's visits to get useful feedback.

For this site, the useful questions are fairly small: which pages receive requests, how that changes over time, and which broad sources bring traffic here. The analytics implementation reflects that scope. It counts qualifying page requests and groups them, rather than building visitor profiles.

Start with what the number actually means

The counter runs in nginx. It records successful GET requests for HTML on the homepage, blog index and article pages. Images, stylesheets and unsuccessful requests do not qualify. Equivalent page paths are normalized, so an article's directory URL and its index.html version belong together. Query strings are not stored in this dedicated stream.

The private dashboard summarizes those records by page and day, with a fourteen-day view using UTC dates. That is useful for spotting changes, but the label matters: these are pageviews, not unique people.

One person can load a page several times. A page request does not prove somebody read the article, enjoyed it or reached the end. I would rather keep that limitation visible than give a simple counter a more impressive name.

Keep the categories broad

The dedicated analytics record contains a day, a normalized page path, a traffic class, a browser category and a referral category. It does not store the raw IP address, User-Agent string or referring URL.

Browser information is reduced to Safari, Chrome, Firefox, Edge or other/unknown. Referral information becomes LinkedIn, search, other sites, same-site navigation or direct/unknown. These are classifications made from request headers, not verified descriptions of the person making the request.

That last category deserves its full name. Direct/unknown does not necessarily mean somebody typed my address. It also covers requests where the browser did not provide a referring site. Older records without the category fields appear as not recorded; the dashboard does not fill in a story it cannot know.

Filter noise without pretending it disappears

The nginx rules exclude obvious crawlers, previews, monitoring tools and other recognizable automated clients, along with requests that have no User-Agent. Verification requests have a separate class and are left out of the dashboard totals.

This is a practical filter, not a way to prove that every remaining request came from a human. An automated client can look like a browser, and a legitimate request can match an exclusion. The result is a useful signal with rough edges, not an exact census.

Be precise about the privacy boundary

There is an important qualification here: normal combined nginx request logs remain enabled alongside the dedicated analytics stream. Those ordinary logs can contain IP addresses, raw User-Agent strings and referrers. It would be wrong to describe the whole server as collecting no identifying information.

The narrower claim is the accurate one. This dashboard uses a separate, limited stream without those raw fields, and its aggregation code does not identify returning visitors or reconstruct individual journeys. Limiting analytics data and reviewing ordinary server logging are related tasks, but they are not interchangeable.

Enough information to make a decision

In my previous post, I wrote about feedback that helps you choose the next step. That is the standard I want here too. Pageview trends can suggest which topics deserve another look, while broad categories provide context.

They cannot tell me who a reader is or why they came. For this kind of site, I am comfortable leaving those questions unanswered.