# vue-analytics

> Google Analytics plugin for Vue

Latest version **5.22.1** (published 2020-01-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vue-analytics
pnpm add vue-analytics
yarn add vue-analytics
bun add vue-analytics
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 5.22.1 |
| Published | 2020-01-08 |
| First published | 2016-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 32.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1781 |
| Author | Matteo Gabriele |
| Maintainers | matteo_gabriele |
| Keywords | Google, google, Google Analytics, google analytics, tracking, google tracking, vue-analytics, vue |

## Links

- npm: https://www.npmjs.com/package/vue-analytics
- Repository: https://github.com/MatteoGabriele/vue-analytics
- Homepage: https://github.com/MatteoGabriele/vue-analytics#readme
- Issues: https://github.com/MatteoGabriele/vue-analytics/issues
- npm.io page: https://npm.io/package/vue-analytics

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 5.22.1 (latest) — 2020-01-08
- 5.0.0-beta.3 (next) — 2017-09-07
- 5.22.0 — 2020-01-08
- 5.21.1 — 2020-01-06
- 5.21.0 — 2020-01-06
- 5.20.2 — 2019-12-28
- 5.20.1 — 2019-12-17
- 5.20.0 — 2019-12-16
- 5.19.1 — 2019-12-13
- 5.19.0 — 2019-12-10
- 5.18.0 — 2019-11-15
- 5.17.5 — 2019-11-13
- 5.17.4 — 2019-11-13
- 5.17.3 — 2019-11-12
- 5.17.2 — 2019-08-18
- … 85 more at https://npm.io/package/vue-analytics/versions

## README

> :warning: **This plugin will stop receiving feature requests. I will only spend time for important bug fixes**. Google moved from analytics.js to its new gtag.js library and I've created a new plugin called [vue-gtag](https://github.com/MatteoGabriele/vue-gtag). I suggest you to start using that one if you are about to create a new project.

<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

## Requirements

Vue ^2.0.0

## Articles

[Google Analytics, GDPR and Vuejs](https://medium.com/@matteo_gabriele/google-analytics-gdpr-and-vuejs-e1bd6affd2b4)

[Vuejs and Google Analytics](https://medium.com/@matteo_gabriele/vuejs-and-google-analytics-689a07e00116)

[Tips & tricks for vue-analytics](https://medium.com/@matteo_gabriele/tips-tricks-for-vue-analytics-87a9d2838915)

## Install

```bash
npm install vue-analytics
```

## User guide

* [Get started](/docs/installation.md)
* [How to load Google Analytics](/docs/script-loader.md)
* [Page tracking](/docs/page-tracking.md)
* [Event tracking](/docs/event-tracking.md)
* [Screen tracking](/docs/screen-tracking.md)
* [Event batches](/docs/batch.md)
* [v-ga](/docs/v-ga.md)
* [Cross-domain tracking](/docs/cross-domain-tracking.md)
* [User timings](/docs/user-timings.md#user-timings)
* [Exception tracking](/docs/exception-tracking.md)
* [Require](/docs/require.md)
* [Set](/docs/set.md)
* [Social interactions](/docs/social-interactions.md)
* [Fields](/docs/fields.md)
* [On Analytics script ready](/docs/when-google-analytics-is-loaded.md)
* [Custom methods](/docs/custom-methods.md)
* [E-commerce](/docs/ecommerce.md)
* [Untracked hits](/docs/untracked-hits.md)
* [Vuex](/docs/vuex.md)
* [Turn off during development](/docs/turn-off-development.md)
* [Console logs](/docs/console-logs.md)
* [Opt-out from Google Analytics](/docs/opt-out.md)
* [Custom analytics.js URL](/docs/custom-analytics.md)
* [Debug](/docs/debug.md)

# Issues and features requests

Please drop an issue, if you find something that doesn't work, or a feature request at [https://github.com/MatteoGabriele/vue-analytics/issues](https://github.com/MatteoGabriele/vue-analytics/issues)

Follow me on twitter [@matteo\_gabriele](https://twitter.com/matteo_gabriele)

---
_Source: https://npm.io/package/vue-analytics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
