Google Analytics 4 "enhanced measurement" not working
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
Hi all,
According to a few different sources, configuring GA4 for NextJS should be as simple as dropping a
It should pick those up from my understanding. Anyone else encounter this or could provide any guidance?
According to a few different sources, configuring GA4 for NextJS should be as simple as dropping a
<Script> tag to load and configure Google Tag Manager (gtag). If enhanced measurement is enabled (see https://support.google.com/analytics/answer/9216061?hl=en), then we should have automatic page view tracking working, without needing to plug into route changes via usePathname or useSearchParams. In practice though, I'm not seeing this work. I have a very simple GoogleAnalytics component to add the script tag, and I do see an initial page view fire off, but no subsequent page views on path changes https://gist.github.com/msukmanowsky/b58386535bcb6720a5811eeb57962344.It should pick those up from my understanding. Anyone else encounter this or could provide any guidance?