zadigetvoltaire / nuxt-gtm

Nuxt 3 module for Google Tag Manager
https://www.npmjs.com/package/@zadigetvoltaire/nuxt-gtm
MIT License
59 stars 3 forks source link

This plugin doesn't work for AW-* tags #15

Open danieldanielecki opened 9 months ago

danieldanielecki commented 9 months ago

It creates an error [nuxt] error caught during app initialization Error: 'AW-*' is not a valid GTM-ID (/^GTM-[0-9A-Z]+$/). Did you mean 'GTM-*'?, which is issue one.

However, it also creates very unintuitive error when using Vuetify for a project, namely nuxt.js?v=49ff4004:96 [nuxt] error caught during app initialization Error: [Vuetify] Could not find defaults instance. Lots of functionalities don't work with that setup.

Repo to reproduce: https://github.com/Doyban/Doyban-Website/tree/cab0e05bd28d2e11241b88a72087c001dc2ba188

I tried Node 16/18/20, Vuetify with/out SSR, and the same issue.

danieldanielecki commented 9 months ago

PS. What you need apart from yarn && yarn install is an environmental variable in .env file GTM_ID=AW-*, to reproduce.

danieldanielecki commented 9 months ago

ahh, and tried with runtimeConfig.public and without as well!