From c1d2f351092748c40977d5dd2181d562d7ffccb8 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 27 Feb 2024 10:55:41 +0800 Subject: [PATCH] up --- package.json | 1 + src/App.vue | 22 +++++++++++++++++++--- src/main.js | 21 +++++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c716b25..22f5dec 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "view-design": "^4.7.0", "vue": "2.6.10", "vue-count-to": "^1.0.13", + "vue-matomo": "^4.2.0", "vue-print-nb-jeecg": "^1.0.12", "vue-router": "3.0.6", "vuedraggable": "^2.24.3", diff --git a/src/App.vue b/src/App.vue index ec9032c..c507568 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,23 @@ diff --git a/src/main.js b/src/main.js index 2b7d465..158f150 100644 --- a/src/main.js +++ b/src/main.js @@ -90,6 +90,27 @@ Vue.prototype.$integrateData = (target,value) => { } } } + +import VueMatomo from 'vue-matomo' + +Vue.use(VueMatomo, { + host: 'http://192.168.60.99:9000/', // 这里配置你自己的piwik服务器地址和网站ID + siteId: 7,//siteId值 + // 根据router自动注册 + router: router, + // // 是否需要在发送追踪信息之前请求许可 + // // 默认false + requireConsent: false, + enableLinkTracking: true, + // // 是否追踪初始页面 + // // 默认true + trackInitialView: false, + // // 最终的追踪js文件名 + // // 默认 'piwik' + trackerFileName: 'matomo', + debug: false +}); + new Vue({ el: '#app', router,