-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt 3 GA4 timeline? #135
Comments
^ this library is failing in my nuxt 3 upgrade :( |
Looks like it should probably move over to using vue-gtag - this module doesn't look so complicated. If I get implemented I'll post here what I've done. |
Actually, for google analytics, there is a simple plugin example for implementing it here: https://v3.nuxtjs.org/guide/directory-structure/plugins/#vue-plugins - might be a useful way to get started. E.g. import VueGtag from "vue-gtag";
export default defineNuxtPlugin((nuxtApp) => {
const router = useRouter();
nuxtApp.vueApp.use(
VueGtag,
{
config: {
id: "GA_MEASUREMENT_ID",
},
},
router
);
}); I think this is double tracking right now though and not sure if it's detecting page changes as views properly so needs some looking into. |
Problem is that on first SSR load it doesn't track the right page title. |
@silverbackdan Can I trust your code snippet to work? Did you have time to test this more? Thanks! |
Didn't work for me. |
It worked at the time of posting however perhaps things have changed, sorry for this. |
Hey guys! I've created a seamless GA4 integration for Nuxt 3. 👉 github.com/johannschopplich/nuxt-gtag Features
|
@johannschopplich awesome. I will try |
Will track here #140 :) |
hey,
just wondering if there is a roadmap for the nuxt3 module and if it will support GA4. i would be willing to help with testing/dev but i just don't know where to find any work on it
The text was updated successfully, but these errors were encountered: