Skip to content

Commit 09947d2

Browse files
committed
Add analytics
1 parent 82aaa99 commit 09947d2

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"vue-docgen-cli": "^4.67.0"
1616
},
1717
"dependencies": {
18-
"govuk-vue": "1.0.0"
18+
"govuk-vue": "1.0.0",
19+
"vue-matomo": "^4.2.0"
1920
}
2021
}

plugins/matomo.client.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineNuxtPlugin } from '#app'
2+
import VueMatomo from 'vue-matomo'
3+
4+
export default defineNuxtPlugin((nuxtApp) => {
5+
nuxtApp.vueApp.use(VueMatomo, {
6+
host: '//ambiph.one/analytics/',
7+
siteId: 6,
8+
// Enables automatically registering pageviews on the router
9+
router: nuxtApp.$router,
10+
enableLinkTracking: true,
11+
requireConsent: false,
12+
trackInitialView: true,
13+
disableCookies: true,
14+
requireCookieConsent: false,
15+
})
16+
})

0 commit comments

Comments
 (0)