Vue plugin for Google Analytics
I've published a new plugin called vue-gtag which uses the new gtag.js library for Google Analytics.
The vue-analytics package will soon be deprecated in favor of the new gtag api plugin.
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
Vue ^2.0.0
Google Analytics, GDPR and Vuejs
Tips & tricks for vue-analytics
npm install vue-analytics
- Get started
- How to load Google Analytics
- Page tracking
- Event tracking
- Screen tracking
- Event batches
- v-ga
- Cross-domain tracking
- User timings
- Exception tracking
- Require
- Set
- Social interactions
- Fields
- On Analytics script ready
- Custom methods
- E-commerce
- Untracked hits
- Vuex
- Turn off during development
- Console logs
- Opt-out from Google Analytics
- Custom analytics.js URL
- Debug
Please drop an issue, if you find something that doesn't work, or a feature request at https://github.com/MatteoGabriele/vue-analytics/issues
Follow me on twitter @matteo_gabriele