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

Support for Google Analytics 4 ID in format G-ID #17

Open sjkey opened 8 months ago

sjkey commented 8 months ago

I would like to integrate my app with Google Analytics 4 which now uses a new ID format starting with G-

Unfortunately, when attempting to integrate it, my app encounters a 500 error with the message: G-X is not a valid GTM-ID (/^GTM-[0-9A-Z]+$/).

After investigating, I discovered that the issue lies with the @gtm-support/vue-gtm library, which is responsible among other things for ID validation.

But the author of this library is not willing to adjust a small regexp. Will you be able to fork this repository and base nuxt-gtm on it?

Here are the issues with wontfix labels 🙃 https://github.com/gtm-support/vue-gtm/issues/286 https://github.com/gtm-support/vue-gtm/issues/338 https://github.com/gtm-support/vue-gtm/issues/356

jschroeter commented 8 months ago

This module is made for Google Tag Manager (GTM), not for plain Google Analytics itself. I think the following module is what you're looking for: https://nuxt.com/modules/gtag

danieldanielecki commented 8 months ago

Similar issue https://github.com/zadigetvoltaire/nuxt-gtm/issues/15