Skip to content

Commit

Permalink
add matomo tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
avivace committed Dec 17, 2023
1 parent fce5506 commit 5f0098a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"primeicons": "5.0.0",
"primevue": "^3.30.0",
"sass": "^1.51.0",
"sitemap": "^7.1.1"
"sitemap": "^7.1.1",
"vue-matomo": "^4.2.0"
},
"license": "GPL-3.0-only"
}
18 changes: 18 additions & 0 deletions plugins/matomo.client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This plugin is auto-discovered by Nuxt

import { defineNuxtPlugin } from '#app'
import VueMatomo from 'vue-matomo'

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(VueMatomo, {
host: 'https://stats.gbdev.io',
siteId: 1,
// Enables automatically registering pageviews on the router
router: nuxtApp.$router,
enableLinkTracking: true,
requireConsent: false,
trackInitialView: true,
disableCookies: true,
requireCookieConsent: false,
})
})
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4283,6 +4283,11 @@ vue-devtools-stub@^0.1.0:
resolved "https://registry.yarnpkg.com/vue-devtools-stub/-/vue-devtools-stub-0.1.0.tgz#a65b9485edecd4273cedcb8102c739b83add2c81"
integrity sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ==

vue-matomo@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/vue-matomo/-/vue-matomo-4.2.0.tgz#d65e369e4ead1d95ef790bef3627512cac3d25e9"
integrity sha512-m5hCw7LH3wPDcERaF4sp/ojR9sEx7Rl8TpOyH/4jjQxMF2DuY/q5pO+i9o5Dx+BXLSa9+IQ0qhAbWYRyESQXmA==

vue-router@^4.2.3:
version "4.2.4"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.4.tgz#382467a7e2923e6a85f015d081e1508052c191b9"
Expand Down

0 comments on commit 5f0098a

Please sign in to comment.