#Google Analytics making the hole page client side.

2 messages · Page 1 of 1 (latest)

errant pasture
#

I'm following this tutorial: https://www.youtube.com/watch?v=DJMTWuz2ksk&feature=youtu.be
But the way this is done transform my hole home page in a client side page (just in prod ). Is there a better way to implement analytics in the app router so I can avoid this? Really need some help on that 🥺

#nextjs #googleanalytics #ga4
In this video, we setup Google Analytics in Consent Mode for Next.js 13's new experimental App Directory. We setup GA4 to work with SPAs (Single Page Applications), build a Cookie Banner with Next.js and TailwindCSS, and modify Google Analytics to use Consent Mode.

Blog: https://gaudion.dev/blog/setup-google-analy...

▶ Play video
sour copper