GitPedia

Vue analytics

Google Analytics plugin for Vue

From MatteoGabriele·Updated May 21, 2026·View on GitHub·
·Archived

> :warning: Sorry but vue-analytics is not longer maintained. I would suggest you to switch to [vue-gtag](https://github.com/MatteoGabriele/vue-gtag). With love, the guy who made the package. The project is written primarily in JavaScript, distributed under the MIT License license, first published in 2016. It has gained significant community traction with 1,785 stars and 127 forks on GitHub. Key topics include: analytics, google-analytics, tracking, vue, vue-analytics.

Latest release: v5.22.1
January 8, 2020View Changelog →

:warning: Sorry but vue-analytics is not longer maintained. I would suggest you to switch to vue-gtag. With love, the guy who made the package.

<p align="center"> <img width="180" src="http://i.imgur.com/whvHAT6.png"> <br> <br> <a href="https://npm.im/vue-analytics"> <img src="https://badgen.net/npm/v/vue-analytics"> </a> <a href="https://npm.im/vue-analytics"> <img src="https://badgen.net/npm/dm/vue-analytics"> </a> <a href="https://travis-ci.org/MatteoGabriele/vue-analytics"> <img src="https://badgen.net/travis/MatteoGabriele/vue-analytics/master"> </a> <a href="https://bundlephobia.com/result?p=vue-analytics"> <img src="https://badgen.net/bundlephobia/minzip/vue-analytics"> </a> </p>

vue-analytics

Vue plugin for Google Analytics

Why should I use it?

The plugin isn't just a wrapper of the Google Analytics API, but provides a solution to issues that most of the time you don't want to deal with or you not even know you have to deal with.

For example:

  • Automatic Google Analytics script loading
  • Automatic page tracking
  • Event batching
  • Opt-out from Google Analytics with promise support
  • Multiple domain ID tracking system
  • Vuex support
  • E-commerce API
  • Vue error exception tracking system
  • Debugging API

Does this library support GA4?

Nope! GA4 is only supported by the new gtag.js library which you can find in the vue-gtag package.
This package only uses analytics.js which doesn't provide that feature.

Requirements

Vue ^2.0.0

Articles

Google Analytics, GDPR and Vuejs

Vuejs and Google Analytics

Tips & tricks for vue-analytics

Install

bash
npm install vue-analytics

User guide

Follow me on twitter @matteo_gabriele

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from MatteoGabriele/vue-analytics via the GitHub API.Last fetched: 6/28/2026