-
Notifications
You must be signed in to change notification settings - Fork 68
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
Duplicate GTM initializing in SPA mode #3
Comments
Thanks for report @Manfies. Trying to investigate more. Created a repro for vue-meta behaviour: |
I see that this will block the usage of multiple containers... |
Hi I actually experienced this problem with @nuxtjs/google-tag-manager (which is now deprecated). I had a default value for specifying my I was wondering what is the difference between this repo and @nuxtjs/google-tag-manager. And whether this repo (based on this issue) could have inherited the problem from @nuxtjs/google-tag-manager. Hope you can help. |
@tintinthong This is a full rewrite using an injected snippet on the page. Also currently a guard is added to the snippet to prevent adding duplicate you can try it :) |
Hi I'm also have the same issue - duplicated GTM https://take.ms/lwueD buildModules: [
'@nuxtjs/gtm'
],
gtm: {
id: 'GTM-IDHRERE'
} package.json
|
@dminchev I've having the same behaviour. Tags seem to be accumulating per page. Could this be a detection bug on the Google Tag Assistant extension itself? I'm saying this because of the way Nuxt works (where each page you visit is not thrown away - if you disable internet you can still visit the pages you've watched before, etc..), and what I believe to be the expectation of Google Tag Assistant (each page is a single unit). Also, the data metrics don't seem to be affected. |
I think I've found it. |
Shouldn't we use it as modules and not buildModules? ReadMe suggests so too |
Hi. If you try to run the nuxt application in SPA mode and open the page, you will get a double GTM submission. You can also see two identical scripts in head. The same thing happens when generating applications in the SPA mode.
The text was updated successfully, but these errors were encountered: