From 2de27af03b9630e289ea240f94f6241a968685e9 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Thu, 17 Sep 2026 20:58:06 +0200 Subject: [PATCH] Some anonymous analytics I promise --- package-lock.json | 6 ++++++ package.json | 1 + resources/js/app.ts | 14 ++++++++++++++ resources/views/app.blade.php | 3 +++ 4 files changed, 24 insertions(+) diff --git a/package-lock.json b/package-lock.json index a25fac2..ef3ae7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,6 +6,7 @@ "": { "dependencies": { "@inertiajs/vue3": "^2.3.7", + "@jaseeey/vue-umami-plugin": "^1.6.1", "@lucide/vue": "^1.46.0", "@tailwindcss/typography": "^0.5.20", "@vee-validate/zod": "^4.15.1", @@ -861,6 +862,11 @@ "@swc/helpers": "^0.5.0" } }, + "node_modules/@jaseeey/vue-umami-plugin": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@jaseeey/vue-umami-plugin/-/vue-umami-plugin-1.6.1.tgz", + "integrity": "sha512-a38bB7cYbwMP5HmlrT2Dk2RHdGFxVvLRci2GhY8cIwCpM419qXtvSM6SKmIJ3U3u7zYdcQLVAySOcXY150Z14Q==" + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", diff --git a/package.json b/package.json index 2e9e378..5c7959e 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ }, "dependencies": { "@inertiajs/vue3": "^2.3.7", + "@jaseeey/vue-umami-plugin": "^1.6.1", "@lucide/vue": "^1.46.0", "@tailwindcss/typography": "^0.5.20", "@vee-validate/zod": "^4.15.1", diff --git a/resources/js/app.ts b/resources/js/app.ts index 654c3cd..3d4a5fb 100644 --- a/resources/js/app.ts +++ b/resources/js/app.ts @@ -1,4 +1,5 @@ import { createInertiaApp } from '@inertiajs/vue3'; +import { VueUmamiPlugin } from '@jaseeey/vue-umami-plugin'; import { configureEcho } from '@laravel/echo-vue'; import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; import type { DefineComponent } from 'vue'; @@ -22,6 +23,19 @@ createInertiaApp({ setup({ el, App, props, plugin }) { createApp({ render: () => h(App, props) }) .use(plugin) + .use( + VueUmamiPlugin({ + websiteID: 'e616767f-e0d3-4ce9-b551-33c7c3806fc0', + scriptSrc: 'https://abcd.matthiasg.dev/script.js', + // autoTrack: true, + debug: import.meta.env.DEV, + extraDataAttributes: { + 'data-auto-track': 'true', + 'data-performance': 'true', + 'data-domains': 'perceptron.matthiasg.dev,matthiasg.dev,www.matthiasg.dev', + } + }), + ) .mount(el); }, progress: { diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index 5338582..7d9434c 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -19,6 +19,9 @@ })(); + {{-- Anonymous analytics --}} + + {{-- Inline style to set the HTML background color based on our theme in app.css --}}