improved tracking for google analytics

This commit is contained in:
Čarodej
2022-08-09 09:45:54 +02:00
parent bf580f0b55
commit 16c923bab2
6 changed files with 20 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ import Vue from 'vue'
import i18n from './i18n'
import VueRouter from 'vue-router'
import router from './router'
import VueAnalytics from 'vue-analytics'
import App from './App.vue'
import store from './store'
import { events } from './bus'
@@ -21,6 +22,14 @@ Vue.use(functionHelpers)
Vue.use(AlertHelpers)
Vue.use(itemHelpers)
// Google Analytics implementation
if (config.googleAnalytics) {
Vue.use(VueAnalytics, {
id: config.googleAnalytics,
router
})
}
// ReCaptcha configuration
if (config.allowedRecaptcha) {
Vue.use(VueReCaptcha, {