Skip to content

Commit

Permalink
add analytics for website downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-psi committed Jan 22, 2024
1 parent 0ab89b5 commit aa44a4f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
})
}
</script>

<template>
Expand All @@ -30,6 +36,7 @@ const apkUrl = `${GITHUB_EXTENSION_BASE}/apk/${props.item.apk}`;
class="extension-download"
title="Download APK"
:download="item.apk"
@click="handleAnalytics(item.apk)"
>
</a>
Expand Down

0 comments on commit aa44a4f

Please sign in to comment.