vue-gtagjs

Google gtag.js for Vue.js

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vue-gtagjs
1311.0.77 years ago7 years agoMinified + gzip package size for vue-gtagjs in KB

Readme

vue-gtagjs
Google gtag.js for Vue.js
Install
yarn add vue-gtagjs
Usage

with vue router

import gtagjs from 'vue-gtagjs'
import VueRouter from 'vue-router'


Vue.use(VueRouter)
const router = new VueRouter()
gtagjs(router, GA_TRACKING_ID, {debug: true, scriptId: 'gtagjs'})

Without vue router

import gtagjs from 'vue-gtagjs'
gtagjs(set => set(location.pathname), GA_TRACKING_ID, {debug: true, scriptId: 'customId'})