This commit is contained in:
Troplo 2022-02-10 20:41:55 +11:00
parent e204b0d5e5
commit 9b0e431cde
3 changed files with 100 additions and 0 deletions

View file

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"core-js": "^3.6.5", "core-js": "^3.6.5",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-matomo": "^4.1.0",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuetify": "2.5.10", "vuetify": "2.5.10",
"vuex": "^3.4.0" "vuex": "^3.4.0"

View file

@ -3,7 +3,101 @@ import App from "./App.vue"
import router from "./router" import router from "./router"
import vuetify from "./plugins/vuetify" import vuetify from "./plugins/vuetify"
import store from "./store" import store from "./store"
import VueMatomo from 'vue-matomo'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(VueMatomo, {
// Configure your matomo server and site by providing
host: 'https://analytics.flowinity.com',
siteId: 4,
// Changes the default .js and .php endpoint's filename
// Default: 'matomo'
trackerFileName: 'matomo',
// Overrides the autogenerated tracker endpoint entirely
// Default: undefined
// trackerUrl: 'https://example.com/whatever/endpoint/you/have',
// Overrides the autogenerated tracker script path entirely
// Default: undefined
// trackerScriptUrl: 'https://example.com/whatever/script/path/you/have',
// Enables automatically registering pageviews on the router
router: router,
// Enables link tracking on regular links. Note that this won't
// work for routing links (ie. internal Vue router links)
// Default: true
enableLinkTracking: true,
// Require consent before sending tracking information to matomo
// Default: false
requireConsent: false,
// Whether to track the initial page view
// Default: true
trackInitialView: true,
// Run Matomo without cookies
// Default: false
disableCookies: false,
// Require consent before creating matomo session cookie
// Default: false
requireCookieConsent: false,
// Enable the heartbeat timer (https://developer.matomo.org/guides/tracking-javascript-guide#accurately-measure-the-time-spent-on-each-page)
// Default: false
enableHeartBeatTimer: false,
// Set the heartbeat timer interval
// Default: 15
heartBeatTimerInterval: 15,
// Whether or not to log debug information
// Default: false
debug: false,
// UserID passed to Matomo (see https://developer.matomo.org/guides/tracking-javascript-guide#user-id)
// Default: undefined
userId: undefined,
// Share the tracking cookie across subdomains (see https://developer.matomo.org/guides/tracking-javascript-guide#measuring-domains-andor-sub-domains)
// Default: undefined, example '*.example.com'
cookieDomain: undefined,
// Tell Matomo the website domain so that clicks on these domains are not tracked as 'Outlinks'
// Default: undefined, example: '*.example.com'
domains: "*.troplo.com",
// A list of pre-initialization actions that run before matomo is loaded
// Default: []
// Example: [
// ['API_method_name', parameter_list],
// ['setCustomVariable','1','VisitorType','Member'],
// ['appendToTrackingUrl', 'new_visit=1'],
// etc.
// ]
preInitActions: [],
// A function to determine whether to track an interaction as a site search
// instead of as a page view. If not a function, all interactions will be
// tracked as page views. Receives the new route as an argument, and
// returns either an object of keyword, category (optional) and resultsCount
// (optional) to track as a site search, or a falsey value to track as a page
// view.
// Default: false, i.e. track all interactions as page views
// Example: (to) => {
// if (to.query.q && to.name === 'search') {
// return { keyword: to.query.q, category: to.params.category }
// } else {
// return null
// }
// }
trackSiteSearch: false
});
new Vue({ new Vue({
router, router,

View file

@ -8343,6 +8343,11 @@ vue-loader@^15.9.2:
vue-hot-reload-api "^2.3.0" vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0" vue-style-loader "^4.1.0"
vue-matomo@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/vue-matomo/-/vue-matomo-4.1.0.tgz#17b513bc8ac60e168bfa8190ad05b3257a3c441e"
integrity sha512-y+tdmhY835Ip3EAGfIAgA33+aBYrvRT7fNnBnA7bSM459XpoWXgqJKdbopVpEUrxCPIq8IkuF7g4KqSLc0Fa3w==
vue-router@^3.2.0: vue-router@^3.2.0:
version "3.5.2" version "3.5.2"
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c" resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c"