← Board
SC-27Ready for QAPhase Two · The First Floor

Wire in Google Analytics

Counting visits, with the one private page counted but never named.

The tag loads on every page in production and never in development, so the reports are visitors rather than the person building the site.

/privacy says what it does in plain words — a cookie, a random identifier, which pages you opened, roughly where you are, what device — and says that Google holds the underlying records on their terms. That section is a claim about this code and has to stay true of it.

The holocron is counted, not named

The page is private and kept out of every index. Sending its address in a pageview would give away by measurement what the headers and the sitemap are careful not to say, so it reports as /(private). A number does not need a name.

That took more than passing a different path. The tag's own automatic pageview reads window.location at the moment it fires, which on a client-side navigation is before anything could intervene — so it is off (send_page_view: false) and every pageview is fired from analytics.tsx instead. The scrubbed location is set rather than passed, because a scroll or an outbound click carries a page_location too and those would have leaked the real path on their own.

Referrer-Policy: no-referrer went on the same path in next.config.ts. Nothing there links off-site today, which is exactly when to set it — the day something does is not the day anyone remembers. That also answers part of finding 3 in SC-21, for one route rather than the site.

Outstanding

One switch in the GA property, not in this repository: Enhanced Measurement's "page changes based on browser history events" has to be off. Left on, the tag keeps firing its own pageviews from the real URL on top of ours and the scrub is decoration.

Worth confirming in Realtime after the next deploy that a holocron visit shows as /(private). That has not been observed yet — the headers and the tag loading were checked against a production server, the reports were not.