-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi @PauloMFJ and @JPedersen , great work on this plugin!
I've found an issue. Unfortunately I don't have time to raise a PR, but I wanted to raise this anyway in case someone else has time to look into fixing this issue.
When next-gtm
is implemented in a NextJS (12.1.6) project, I could confirm using Omnibug and Real time data in Google Analytics that GTM was set up, and GA was capturing page view events alright.
However, in Google Tag Manager the Preview / Live Debug feature does not seem to work with this plugin. It seems that the way the plugin loads up the gtag js
file with the auth and debug params causes the script to fail to load due to a 403 HTTP error, and even though the Tag Assist and the debugged live site are connected, there is no traffic being captured when running the site in debug mode.
Once I implemented GTM using the NextJS way (https://github.com/vercel/next.js/tree/canary/examples/with-google-tag-manager) everything started to work - including the Debug / Preview feature.
Please see the screenshot for reference: