nuxt-community / gtm-module

Google Tag Manager Module for Nuxt.js
MIT License
328 stars 71 forks source link

GTM is not detected by Google Tag Assistant #92

Open tandeman77 opened 3 years ago

tandeman77 commented 3 years ago

Hi, i'm using the latest version of @nuxtjs/gtm, 2.4.0. The issue is the GTM is not detected by the Tag Assistant. I can see that GTM code is on the website. However, it doesn't look like it is working as Google Analytics is not receiving any data meaning the tag did not fire.

//nuxt.config.js
ssr: false,
target: 'static',
....
modules: [
    '@nuxtjs/axios',
    '@nuxtjs/auth-next',
    'bootstrap-vue/nuxt',
    '@nuxtjs/pwa',
    '@nuxtjs/gtm'
  ],
gtm: {
    enabled: true,
    id: 'GTM-NBL87DW',
    pageTracking: true,
    pageViewEventName: 'routerView',
  },
....
Kaperskyguru commented 3 years ago

I think Google has changed the GTM script. I just crossed checked, it not the same as the one this module generates.

stursby commented 3 years ago

Can confirm as well. Using Nuxt ^2.14.7 and GTM module not working.

tandeman77 commented 3 years ago

nuxt is ^2.14.6 atm

stursby commented 3 years ago

@tandeman77 hmmm npm and my package.json say otherwise 😜

image

tandeman77 commented 3 years ago

@stursby I meant i had nuxt 2.14.6 installed. I'll try updating Nuxt to the latest version and see if the issue is still there. Thanks!

tandeman77 commented 3 years ago

Using @nuxtjs/gtm": "^2.4.0, "nuxt": "2.14.8",

still the same issue

wh5a commented 3 years ago

@tandeman77 respectDoNotTrack is enabled by default. Check if you enabled this feature in your browser, if so this module would respect the browser setting.

monkemedia commented 3 years ago

Has anyone found a solution for this issue?

monkemedia commented 3 years ago

Solved it:

you must PUBLISH the container in Google Tag Manager

QuangPhamll commented 3 years ago

Testing with @nuxtjs/gtm": "^2.4.0, "nuxt": "2.14.3", and also with "nuxt": "2.14.12"

same issue

Otherwise the old version @nuxtjs/google-tag-manager work well !

sXe79 commented 3 years ago

Same here, not working. "@nuxtjs/gtm": "^2.4.0", "nuxt": "^2.14.12"

janwillemwilmsen commented 3 years ago

Same problem here. "@nuxtjs/gtm": "^2.4.0", "nuxt": "^2.14.12"

And guess that if the TagAssistant does not work, the TagManager itself also doesn't work. Also getting 'net::ERR_UNSAFE_REDIRECT' errors in console. Don't know if that is related to the TagAssistant problem.

xandao-dev commented 3 years ago

I got the same problem. I solved this by updating nuxt to 2.15.0, then I added this fields to gtm property

gtm: {
    enabled: true,
    id: 'GTM-XXXXXX',
    pageTracking: true,
},

Also I had published the container in GTM (I think that's what fixed it)

melalj commented 3 years ago

@xandao6 Do you know what changed in nuxt 2.15 that fixed it? While debugging, it seems that event "gtm.historyChange-v2" is being send when a nuxt-link is clicked

xandao-dev commented 3 years ago

@xandao6 Do you know what changed in nuxt 2.15 that fixed it? While debugging, it seems that event "gtm.historyChange-v2" is being send when a nuxt-link is clicked

I didn't get to look, but I suspect that what decided for me was to publish the container in gtm and not to update nuxt.

j4tmr commented 3 years ago
gtm: {
    enabled: true,
    id: 'G-XXXXXXXXX',
    pageTracking: true,
    scriptURL: 'https://www.googletagmanager.com/gtag/js'
  },
rlam3 commented 3 years ago

@jhd4tmr why do we need to add the " scriptURL: 'https://www.googletagmanager.com/gtag/js' " ?

j4tmr commented 3 years ago

@rlam3 new version changed not use the old script any more

arapl3y commented 3 years ago

This still doesn't seem to be working even with a published container. (I also tried adding the script URL mentioned by @jhd4tmr to no avail)

gtm: {
  enabled: true,
  debug: true,
  pageTracking: true,
  id: 'GTM-XXXXXX'
}
"nuxt": "^2.14.12",
"@nuxtjs/gtm": "^2.4.0"
kwtgac commented 3 years ago

Still not working! anyone fixed it?

kotvasili commented 3 years ago

I have the same issue. Nuxt 2.15.8 From what I see code added under gtm-script id just doesnt put actual script that requests GTM container into head

diegotayro commented 2 years ago

@kotvasili i just tried with Nuxt 2.15.8, created my gtm acount with my container without tags and Tag Asistan recognizes it. I change the url to this one scriptURL: 'https://www.googletagmanager.com/gtag/js' With version befor 2.15 like 2.14 i could not make it work

sitthinutk commented 2 years ago

does anyone manage to make it work for nuxt 2.15.8? I tried all of your discussions above but still silent on GTM tag assistant

Screen Shot 2565-08-22 at 12 37 42

rwaness commented 2 years ago

Is Google Tag Manager Preview Mode Not Working? 22 Ways To Fix It.

https://www.analyticsmania.com/post/google-tag-manager-preview-mode-not-working/

GabrielHangor commented 1 year ago

Downgrading to v 2.3.2 solved the issue

dygaomarques commented 1 year ago

Google seems to discontinue the Tag Assistant Extension, they so have added the tittle (legacy) to extension, to debug the new version use this service: Google Tag Assistant, works fine to me.