In September we merged our marketing site into the app, so everything moved onto one domain. A few weeks later Google Analytics told a frightening story: organic search visits had fallen off a cliff, right after the move. It looked like the migration had broken our SEO.
It hadn't. Search traffic was growing the whole time. Our analytics had simply stopped seeing most of it. This is the story of how we found out, and how we count visits now.
What the dashboards said
Two tools, two completely different pictures of the same weeks:
| Source | After the move |
|---|---|
| Google Analytics 4 | Organic visits dropped to almost nothing |
| Google Search Console | Impressions more than doubled; clicks held steady |
Search Console counts clicks on Google's own side, before the visitor ever reaches your site. Nothing in the browser can hide those. So when the two disagree, Search Console is the one to believe for search traffic. That alone told us the "drop" was a measurement problem, not a ranking problem. We checked the rest anyway: no manual action, no indexing errors beyond a sitemap that needed resubmitting, and course pages starting to rank for searches they had never ranked for before.
The cause: Consent Mode with a default of "denied"
The old marketing site had no cookie banner and no Consent Mode. The app did. When the two merged, every page on the domain inherited the app's setup: Google's Consent Mode with analytics_storage set to denied until the visitor accepts.
That is the right default under GDPR. But it has a consequence that is easy to miss on a small site:
- A visitor who declines, or simply ignores the banner, sends no normal analytics hits.
- Google can fill that gap with behavioural modelling , estimating the missing visitors from the ones who consented. But modelling only switches on once a property has a substantial volume of both consented and unconsented traffic every day, for days in a row.
- A young site is nowhere near that. So the unconsented visitors are not modelled. They are just gone.
Search visitors are exactly the ones least likely to click "Accept" on a site they have never seen. So the people GA4 lost were disproportionately the ones arriving from Google, and the organic channel looked like it had collapsed.
How we count visits now
We didn't want a second cookie banner, and we didn't want to guess. So we moved visit counting to the server, where it needs no consent because it stores nothing that identifies a person.
Every page is served by our Angular SSR server (Express), so it sees every full page load. A small recorder there:
-
Counts 2xx page loads of real pages. Unknown URLs answer 404 and are never counted, so scanners probing
/wp-login.phpdon't inflate the numbers. - Tells people from bots without cookies. A visitor is identified only by a hash of their IP address and user agent with a salt that changes every day, so the same person is one visitor today and unrecognisable tomorrow. Known crawlers are counted separately. A browser-like client only counts as a person once the page reports a first real interaction (a tap, a key press, a mouse move), because most headless scrapers never send one.
- Sends aggregate counts to the backend once a minute: page, day, landing source, device type. Never the hash, never an address.
Our privacy statement describes exactly what is kept, and nothing in it needed consent. The result is a traffic number we trust, with GA4 kept for what it is good at: detailed behaviour of the visitors who opted in.
What we learned
- Search Console is the ground truth for search traffic. Look there first before concluding that a migration hurt your rankings.
- A Consent Mode change is a measurement change. If your consent setup changes, your GA4 history before and after is not comparable, especially below the modelling threshold.
- Small sites can't rely on modelling. If most of your visitors never accept analytics cookies, GA4 shows you a sample, not your traffic.
- Count what you need on the server. Page loads, landing sources and conversions can be counted without cookies and without identifying anyone. It is less detailed than client-side analytics, and that is the point.
The migration was fine all along. The only thing that broke was our view of it.
See it running. Every Brixus course is built in this editor, with exam questions inside the lessons. The first lesson of each course is free to read, no account needed. Read a free lesson
Top comments (0)