URL scrubbing
How password-reset and deletion tokens stay out of the URLs each analytics provider records, and the GA4 settings that keep it that way.
No analytics or support script loads while the address bar holds a credential (a reset or deletion ?token=); those pages drop it once read. A script already loaded also records in-app navigations, so each provider's URLs pass through @repo/utils/url-scrub.
| Provider | How a credential is kept out of recorded URLs |
|---|---|
| PostHog, Umami, browser Sentry | Their own before-send hook scrubs every URL |
| OpenPanel | Its filter hook scrubs every event, screen views included |
| Vercel Analytics, Speed Insights | Their beforeSend hook scrubs every URL |
| Plausible | Loads script.manual.js; the app sends each pageview and event with a scrubbed URL |
| Google Analytics 4 | send_page_view: false; the app sends each page_view with a scrubbed page_location / page_referrer |
| DataFast, Ahrefs | Not covered - no hook. A navigation onto an address carrying a token (a sign-in ?redirect= holding one) reaches them unscrubbed |
Google Analytics 4 settings
Admin → Data streams → your web stream → Enhanced measurement → Page views → Show advanced settings: clear Page changes based on browser history events and save. Left on, it sends its own unscrubbed page_view on every in-app navigation and double-counts.
For defence in depth, list token, code and otp under Redact data → URL query parameters.
Pageviews and attribution
PostHog capture settings (SPA pageviews, page-leaves, dead clicks, web vitals) and first-touch attribution - the first_touch cookie, the user field it lands on, and the person properties it feeds.
MCP analytics
PostHog MCP Analytics for the outward MCP server - one event per tool call and listing, attributed to the signed-in user, with tool payloads off by default.