diff --git a/package.json b/package.json index c2b9d69..80450dc 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "roboto-fontface": "*", "uuid": "8.3.2", "vue": "3.2.37", + "vue-matomo": "^4.1.0", "vue-router": "4.0.16", "vuetify": "3.0.0-beta.5", "webfontloader": "1.6.28" diff --git a/src/main.ts b/src/main.ts index c53b720..864b8f3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,7 @@ import { loadFonts } from "./plugins/webfontloader"; import { createPinia } from "pinia"; import piniaPluginPersistedstate from "pinia-plugin-persistedstate"; import axios from "axios"; +import VueMatomo from "vue-matomo"; loadFonts(); const pinia = createPinia(); @@ -13,4 +14,13 @@ pinia.use(piniaPluginPersistedstate); axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL; -createApp(App).use(router).use(vuetify).use(pinia).mount("#app"); +createApp(App) + .use(router) + .use(vuetify) + .use(pinia) + .use(VueMatomo, { + host: "https://stats.sebclem.fr", + siteId: 2, + router: router, + }) + .mount("#app"); diff --git a/yarn.lock b/yarn.lock index 9d979f8..15f2ee1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -995,6 +995,7 @@ __metadata: vitest: 0.16.0 vue: 3.2.37 vue-cli-plugin-vuetify: 2.5.1 + vue-matomo: ^4.1.0 vue-router: 4.0.16 vue-tsc: 0.38.2 vuetify: 3.0.0-beta.5 @@ -4037,6 +4038,13 @@ __metadata: languageName: node linkType: hard +"vue-matomo@npm:^4.1.0": + version: 4.1.0 + resolution: "vue-matomo@npm:4.1.0" + checksum: aa61926ff56b17b7adb88791b1d945b8acad68b89f06641f83c2b263b73aec2d55de0889fbe625fe8ef2bef46b52f6a48296ebbc00f4e6934293be3fee9a9a97 + languageName: node + linkType: hard + "vue-router@npm:4.0.16": version: 4.0.16 resolution: "vue-router@npm:4.0.16"