Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lingobus/vue-gtagjs
Google gtag.js for Vue.js
https://github.com/lingobus/vue-gtagjs
google-analytics google-gtag googleanalytics gtags vue vuejs
Last synced: about 2 months ago
JSON representation
Google gtag.js for Vue.js
- Host: GitHub
- URL: https://github.com/lingobus/vue-gtagjs
- Owner: lingobus
- Created: 2017-12-01T09:54:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T08:26:08.000Z (about 7 years ago)
- Last Synced: 2024-10-31T12:39:58.253Z (2 months ago)
- Topics: google-analytics, google-gtag, googleanalytics, gtags, vue, vuejs
- Language: JavaScript
- Size: 52.7 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-gtagjs
Google gtag.js for Vue.js
Install
====
> yarn add vue-gtagjsUsage
====## with vue router
```js
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
```js
import gtagjs from 'vue-gtagjs'
gtagjs(set => set(location.pathname), GA_TRACKING_ID, {debug: true, scriptId: 'customId'})
```