From aa44a4f49c2089fef3379b6040362d8c2c437f52 Mon Sep 17 00:00:00 2001 From: beerpiss Date: Tue, 23 Jan 2024 00:39:27 +0700 Subject: [PATCH] add analytics for website downloads --- .../theme/components/Extensions/ExtensionItem.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/.vitepress/theme/components/Extensions/ExtensionItem.vue b/website/.vitepress/theme/components/Extensions/ExtensionItem.vue index f973845..12110ed 100644 --- a/website/.vitepress/theme/components/Extensions/ExtensionItem.vue +++ b/website/.vitepress/theme/components/Extensions/ExtensionItem.vue @@ -9,6 +9,12 @@ const pkgId = props.item.pkg.replace('eu.kanade.tachiyomi.extension.', ''); const pkgName = props.item.name.split(': ')[1]; const iconUrl = `${GITHUB_EXTENSION_BASE}/icon/${props.item.pkg}.png`; const apkUrl = `${GITHUB_EXTENSION_BASE}/apk/${props.item.apk}`; + +function handleAnalytics(apk: string) { + window.goatcounter?.count({ + path: `/extensions/apk/${apk}` + }) +}