Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Google Analytics integration for Nuxt 2 using vue-analytics, with automatic page tracking, event batching, and e-commerce support.
@nuxtjs/google-analytics is a Nuxt 2 module that brings Google Analytics (Universal Analytics / GA3) tracking to Nuxt applications through the vue-analytics library.
@nuxtjs/google-analytics is a community-maintained Nuxt module that integrates Google Analytics into Nuxt 2 projects by leveraging vue-analytics. It takes a Google Analytics tracking ID as configuration and produces automatic page tracking, event tracking, and e-commerce tracking across the app. The module is part of the Nuxt Community organization and is released under the MIT License.
The package does not support GA4; it only works with the legacy GA3/UA property. For Nuxt 3 support, the project documentation directs users to the nuxt-gtag module instead.
Nuxt 2 developers who want to add analytics to their sites without hand-writing tracking code. Specific user roles include:
No. The package explicitly warns that it does not support GA4 and only works with GA3/UA. For GA4, the project recommends the nuxt-gtag module.
Yes. The module is open source and released under the MIT License, so it can be used freely in commercial and personal projects.
It is installed as a Nuxt module and configured in nuxt.config.js with your Google Analytics tracking ID. The module then loads the analytics script and starts tracking automatically. The full setup instructions are in the official documentation at google-analytics.nuxtjs.org.
No. It only targets Nuxt 2. The documentation points Nuxt 3 users to the alternative module nuxt-gtag.
Automatic page tracking, event batching, user timings, screen view, multiple domain ID support, automatic script loading, and e-commerce support.
