Handle hash-navigation with goatcounter

This commit is contained in:
He4eT 2021-03-26 02:43:30 +05:00
commit 1ae4fe81f5

View file

@ -24,9 +24,21 @@
</div>
</div>
<script src="./src/index.js"></script>
<!-- <goatcounter> -->
<script>
window.goatcounter = { no_onload: true }
window.addEventListener('hashchange', _ => {
window.goatcounter.count({
path: location.pathname + location.hash
})
})
</script>
<script
data-goatcounter="https://odd-ifplayer.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>
<!-- </goatcounter> -->
</body>
</html>