From 0382acbb2519c87ee88eab720ffe8de423d04aae Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Mon, 1 Dec 2025 14:58:45 -0500 Subject: [PATCH] Tried my damndest, will pick this up again another time --- ui/.env.example | 5 ++++- ui/package-lock.json | 27 +++++++++++++++++---------- ui/package.json | 1 + ui/src/main.js | 17 ++++++++++++----- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/ui/.env.example b/ui/.env.example index becdf99..b9e66a4 100644 --- a/ui/.env.example +++ b/ui/.env.example @@ -4,4 +4,7 @@ VITE_ENVIRONMENT= # dev / prod # Glitchtip VITE_GLITCHTIP_DSN= -VITE_DISABLE_GLITCHTIP= # true/false \ No newline at end of file +VITE_DISABLE_GLITCHTIP= # true/false + +# Matomo +VITE_DISABLE_MATOMO= # true/false \ No newline at end of file diff --git a/ui/package-lock.json b/ui/package-lock.json index 892d05e..1b83448 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -8,6 +8,7 @@ "name": "milsimsitev4", "version": "0.0.0", "dependencies": { + "@certible/use-matomo": "^1.1.0", "@fullcalendar/core": "^6.1.19", "@fullcalendar/daygrid": "^6.1.19", "@fullcalendar/interaction": "^6.1.19", @@ -510,6 +511,12 @@ "node": ">=6.9.0" } }, + "node_modules/@certible/use-matomo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@certible/use-matomo/-/use-matomo-1.1.0.tgz", + "integrity": "sha512-9kOTj0ldP+RX2Rhlosxm/+1uQ2deDefMb4p2DQGFi3Gqi3TuTSrOtx+beUNKGN7D8up/8SsBPJS+ipY1ZHMfrA==", + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.9", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", @@ -3594,13 +3601,13 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -3728,17 +3735,17 @@ } }, "node_modules/vite": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.2.tgz", - "integrity": "sha512-J0SQBPlQiEXAF7tajiH+rUooJPo0l8KQgyg4/aMunNtrOa7bwuZJsJbDWzeljqQpgftxuq5yNJxQ91O9ts29UQ==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.4.tgz", + "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==", "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.6", + "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", - "tinyglobby": "^0.2.14" + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" diff --git a/ui/package.json b/ui/package.json index 03d590f..0962581 100644 --- a/ui/package.json +++ b/ui/package.json @@ -12,6 +12,7 @@ "preview": "vite preview" }, "dependencies": { + "@certible/use-matomo": "^1.1.0", "@fullcalendar/core": "^6.1.19", "@fullcalendar/daygrid": "^6.1.19", "@fullcalendar/interaction": "^6.1.19", diff --git a/ui/src/main.js b/ui/src/main.js index bed1eeb..91897b9 100644 --- a/ui/src/main.js +++ b/ui/src/main.js @@ -9,14 +9,10 @@ import FormCheckbox from './components/form/FormCheckbox.vue' import FormInput from './components/form/FormInput.vue' import * as Sentry from "@sentry/vue"; - - - +import { initMatomo } from "@certible/use-matomo" const app = createApp(App) - - app.use(createPinia()) app.use(router) @@ -36,7 +32,18 @@ if (!!import.meta.env.VITE_DISABLE_GLITCHTIP) { }); } +if (!!import.meta.env.VITE_DISABLE_MATOMO) { + console.log("Matomo init") + app.use(initMatomo({ + host: 'https://stats.nexuszone.net/', + siteId: 4, + trackRouter: true, + })); +} + app.component("FormInput", FormInput) app.component("FormCheckbox", FormCheckbox) app.mount('#app') + +// window._paq.push(['trackPageView']); \ No newline at end of file