lion 2 years ago
parent 8c9dac453b
commit c1d2f35109

@ -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",

@ -5,7 +5,23 @@
</template>
<script>
export default {
name: 'App'
}
import {
mapGetters
} from 'vuex'
export default {
name: 'App',
computed: {
...mapGetters([
'name'
])
},
watch: {
$route(to, from) {
let locationHash = window.location.hash;
this.$matomo.setCustomUrl(locationHash.replace(/#/g, ''));
this.$matomo.trackPageView(to.meta.title) //
}
}
}
</script>

@ -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,

Loading…
Cancel
Save