vue-gtagjs

1.0.7 • Public • Published

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'})

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i vue-gtagjs

    Weekly Downloads

    62

    Version

    1.0.7

    License

    MIT

    Last publish

    Collaborators

    • aztack