Vuejs and Google Analytics

Track all your pages with 5 lines of code

Few months ago I started creating apps with Vuejs and something that you have to face sooner or later is tracking with Google Analytics.

There were no libraries yet available for this purpose, because the community around Vue it’s still kind of young, compared to library like React, and so I just published one myself: vue-analytics

Long story short, now I’m at version 4 of this plugin and here is how you can track your entire application with 5 lines of code

That’s it! You can commit, push and go grab a beer!


Obviously the plugin does more than that, like: tracking events, timings, social interactions, error exceptions and other features that you can find on its documentation right here.

If you have ideas for other features or you find issues, just let me know!