From 9e9c5dc7673c77a3fe5059e931226551ea59397c Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Sun, 30 Aug 2026 14:23:07 +0200 Subject: [PATCH] fix(site): track the install copy button with data-umami-event Every other homepage link is tracked declaratively; the copy button called window.umami directly, and only on success, so failed copies never showed up in the stats. --- website/.vitepress/components/HomePage.vue | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/website/.vitepress/components/HomePage.vue b/website/.vitepress/components/HomePage.vue index 18a5fe94..1ae27851 100644 --- a/website/.vitepress/components/HomePage.vue +++ b/website/.vitepress/components/HomePage.vue @@ -43,19 +43,11 @@ async function copyInstallCommand() { try { await navigator.clipboard.writeText(installCommand); copyState.value = 'copied'; - track('home-install-copy'); } catch { copyState.value = 'failed'; } resetCopyState(); } - -function track(event: string) { - const analytics = ( - window as Window & { umami?: { track: (name: string) => void } } - ).umami; - analytics?.track(event); -}