analytics icon indicating copy to clipboard operation
analytics copied to clipboard

GTM plugin does not properly set event name

Open ccook10-chwy opened this issue 2 years ago • 0 comments

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.

ccook10-chwy avatar Feb 18 '23 16:02 ccook10-chwy