The bots could not be filtered, so the metric had to be redefined
What was wrong
From late June 2026 raw visitor counts ran five to ten times inflated by corporate link scanners — Microsoft SafeLinks and its equivalents, following every URL in every email that passes through a company mailbox. They arrive as ordinary desktop Chrome with a search-engine referrer. Every obvious fix was available and every one failed: the analytics vendor's own user-agent bot filter does not catch them, and no client-side signal exists at the moment a pageview fires, so nothing can be dropped at ingestion.
What I did
Stop trying to identify bots and change what the metric counts. Engaged visitors — unique people who fire a page-leave event, which a single-pageview scanner never does. The swap was cheap because that event carries the same host, path, device-type and referring-domain properties, so every existing breakdown survived intact. Applied at query time, so the contaminated history stays in the database and stays readable, annotated rather than deleted.
Why the obvious answer was worse
The clever-looking move was to build a cohort of confirmed scanners and exclude it. I built it. Excluding all of them moved a 10,232-visitor week to 10,077 — a 1.5% dent on a population that was mostly bots, because only a sliver of scanners are identifiable that way. A filter that removes 1.5% of a contaminated population is worse than no filter, because it looks like a fix and you stop asking. A metric bots structurally cannot fake needs no maintenance; a blocklist needs it forever and degrades silently in between.