GA4 Scroll Events Not Firing in Next.js App Router
GA4 enhanced measurement scroll events stop firing after the first route in Next.js App Router. Here is why the listener detaches and the exact fix.
Writing
6 write-ups from production, newest first. Each one is a problem hit on a real project and how it was diagnosed and fixed.
GA4 enhanced measurement scroll events stop firing after the first route in Next.js App Router. Here is why the listener detaches and the exact fix.
GA4 reporting double the scroll events for every page view? Here is why enhanced measurement duplicates with App Router and the precise setting that fixes it.
GA4 page views jumped 20-40% after enabling Speculation Rules prerendering? Why prerendered pages double-count, and the prerenderingchange fix.
Moved GA4 to server-side GTM and conversions dropped to zero? Why the client_id is being dropped, and the header forwarding fix that brings them back.
GA4 Consent Mode v2 missing conversions data in your reports? Fix the default deny order, ads_data_redaction, and the URL passthrough setup with code.
GA4 is firing two page_view events per navigation in the Next.js App Router. Here is the root cause and the exact fix with a working listener.