Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Tag Manager Tag Assist / Debug mode and Preview not working #23

Open
robpataki opened this issue Sep 27, 2022 · 0 comments
Open

Comments

@robpataki
Copy link

robpataki commented Sep 27, 2022

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:

bug-gtm-01
bug-gtm-02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant