gtm-module icon indicating copy to clipboard operation
gtm-module copied to clipboard

GTM is not detected by Google Tag Assistant

Open tandeman77 opened this issue 4 years ago • 26 comments

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',
  },
....

tandeman77 avatar Nov 21 '20 00:11 tandeman77

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

Kaperskyguru avatar Nov 22 '20 00:11 Kaperskyguru

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

stursby avatar Nov 25 '20 00:11 stursby

nuxt is ^2.14.6 atm

tandeman77 avatar Nov 25 '20 04:11 tandeman77

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

image

stursby avatar Nov 25 '20 15:11 stursby

@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 avatar Nov 25 '20 23:11 tandeman77

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

still the same issue

tandeman77 avatar Dec 16 '20 03:12 tandeman77

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

wh5a avatar Dec 20 '20 11:12 wh5a

Has anyone found a solution for this issue?

monkemedia avatar Jan 06 '21 20:01 monkemedia

Solved it:

you must PUBLISH the container in Google Tag Manager

monkemedia avatar Jan 06 '21 21:01 monkemedia

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 !

QuangPhamll avatar Jan 29 '21 16:01 QuangPhamll

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

sXe79 avatar Jan 30 '21 14:01 sXe79

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.

janwillemwilmsen avatar Jan 31 '21 12:01 janwillemwilmsen

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)

xandao-dev avatar Feb 16 '21 00:02 xandao-dev

@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

melalj avatar Feb 17 '21 21:02 melalj

@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.

xandao-dev avatar Feb 18 '21 02:02 xandao-dev

gtm: {
    enabled: true,
    id: 'G-XXXXXXXXX',
    pageTracking: true,
    scriptURL: 'https://www.googletagmanager.com/gtag/js'
  },

j4tmr avatar Apr 01 '21 09:04 j4tmr

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

rlam3 avatar Apr 06 '21 13:04 rlam3

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

j4tmr avatar Apr 07 '21 06:04 j4tmr

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"

arapl3y avatar Jun 09 '21 00:06 arapl3y

Still not working! anyone fixed it?

kwtgac avatar Jul 27 '21 13:07 kwtgac

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

kotvasili avatar Sep 15 '21 12:09 kotvasili

@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

diegotayro avatar Feb 08 '22 20:02 diegotayro

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

sitthinutk avatar Aug 22 '22 05:08 sitthinutk

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/

rwaness avatar Sep 01 '22 14:09 rwaness

Downgrading to v 2.3.2 solved the issue

GabrielHangor avatar Nov 02 '22 08:11 GabrielHangor

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.

dygaomarques avatar Mar 13 '23 16:03 dygaomarques