1.2.1 • Published 5 years ago

vue-handy-ga v1.2.1

Weekly downloads
7
License
MIT
Repository
-
Last release
5 years ago

VueHandyGa

Vue.js plugin making Google Analytics (RGPD friendly) integration easy!

Quick start

1. Install

Install the npm package using CLI

npm install vue-handy-ga
# or
yarn add vue-handy-ga

2. Usage

Vue.js

In your index.js file :

import Vue from 'vue'
import Vuex from 'vuex'
import VueHandyGa from 'vue-handy-ga'

import App from './App.vue'

Vue.use(Vuex)
Vue.use(VueHandyGa)

const options = {
  gaID: 'UA-XXXXXXXX-X'
}

new Vue({
  el: '#app',
  store: new Vuex.Store(),
  vueHandyGaSettings: new VueHandyGa(options),
  render: createElement => createElement(App)
})

In your Single File Component :

<template>
  <div>
    <vue-handy-ga />
  </div>
</template>

<script>
export default {}
</script>

Nuxt.js

In your nuxt.config.js file :

export default : {
  // [...]
  modules: [
    ['vue-handy-ga/nuxt', {
      gaID: 'UA-XXXXXXXX-X'
    }]
  ]
  // [...]
}

Then you can use it the same way you would in a Vue Single File Component.

Documentation

Find the official documentation here

License

MIT

Credits

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago