Symptoms
- Pageviews ~1.6x baseline after SPA migration.
- DebugView shows duplicate
page_viewon route change.
Checks
- GTM preview: multiple tags firing on
historyChangeand on a custom event. - Router: both
pushStatelistener and route hook send events.
Fix
- Emit exactly one
page_viewper route. - Debounce history changes; dedupe if same path within 500ms.
Validate
- Compare 7‑day pre/post; <5% drift accepted.
- Segment by route group to detect regressions.