Open DamianGlowala opened 4 months ago
@DamianGlowala Thanks a lot! Your preparation steps (and PRs) are amazing.
I would love to see the difference or how we can find a way to collaborate with the upcoming https://scripts.nuxt.com/scripts/tracking/google-tag-manager
As I never used GTag, your feedback is welcome 😊
Great question!
Technically, a Google Tag ID is different from a Google Tag Manager. They are primarily used for analytics. While they can be embedded in the Google Tag Manager, the latter contains much more JS, which may be too much for simple analytics purposes.
Nuxt Gtag provides fine-grained options for working with multiple Google Tag IDs (for example, in admin panels where the preferred ID is only known after login), shortcuts like enableAnalytics
, composables like useTrackEvent
, and GDPR-related options.
It's a more opiniated approach than a generic useGoogleTagManager
composable. That's why I'm not sure if it fits into the Nuxt Scripts approach. 🤔
I think we'd love to see this here. It's a solid module and you're a good maintainer. But I want to be cautious about adding a community plugin in the days immediately before we launch Nuxt Scripts, particularly if this is something Nuxt Scripts will end up doing out of the box. Mostly, because it would be annoying for you. (If it's something that will add to what Nuxt Scripts does, then that's great!)
Might be worth putting on pause until Nuxt Scripts is released, at least.
cc: @harlan-zw
Sounds like a good plan. Let's wait for Nuxt Scripts. Maybe I can then write a migration path for Nuxt Gtag users.
This is a fantastic module and has captured a lot of the issues that Nuxt Scripts has also tried to solve for all scripts.
I think there could be scope for this module to exist with Nuxt Scripts but it would need to solve some GA specific DX issues that Nuxt Scripts isn't already solving. Some of which it is already doing:
The APIs for nuxt/scripts (you should already have access) are pretty much complete with just documentation and testing remaining, any feedback you have in terms of how it and this module can work together would be appreciated.
Would be especially interested to hear your thoughts on your module building on top of the Nuxt Scripts useScriptGoogleAnalytics()
composable.
Description
This module provides Google Tag integration.
Repository
https://github.com/johannschopplich/nuxt-gtag
npm
https://www.npmjs.com/package/nuxt-gtag
Nuxt Compatibility
Nuxt 3