analytics
analytics copied to clipboard
GTM plugin does not properly set event name
The google-tag-manager plugin is not adding event names to any events (track, page) . I don't know if this is a bug or a support request, since no one else has reported this yet. I am using it with Next.js 13. I have not been unable to debug why just yet.
All dataLayer pushes for a track('My Event', payload) call have the event: "gtm.click" instead of event: "My Event"
I am using the package versions below.
"@analytics/google-tag-manager": "^0.5.3",
"analytics": "^0.8.1"
My first thought was, maybe this is by design? No problem, I'll override the name with a custom plugin. That had no effect though, and after looking at the code it's clear that this should not be necessary.