#Google Analytics & Google Tag Manager - Best practice?

2 messages ยท Page 1 of 1 (latest)

deep laurel
#

Hello ๐Ÿ‘‹
Does one of you know how to use GTM (google tag manager) with Next & GA?
I installed GA with https://github.com/MauricioRobayo/nextjs-google-analytics
But I wondered how I could track events like button click to spot the less used buttons ๐Ÿ™
Seems like everything online is using Link in _document.tsx, but it feels hacky.
Isn't there an integration with an NPM package using a global context? ๐Ÿค”

I've seen another package: https://www.npmjs.com/package/react-gtm-module
but I am not sure if it wouldn't conflict with the current GA install?

oblique torrent
#

up, would also like to know how to do this