Set referrer to just url without paths

This commit is contained in:
RealStickman 2023-03-12 15:17:18 +01:00
parent fd8a062527
commit f864703a7b

View File

@ -1,7 +1,10 @@
<div id="goatcounter-analytics"> <div id="goatcounter-analytics">
<script> <script>
window.goatcounter = { window.goatcounter = {
// prepend the url to the path
path: function(p) { return location.host + p } path: function(p) { return location.host + p }
// normalize referrer to just the URL
referrer: function(r) { new URL(document.referrer).origin }
} }
</script> </script>
<script data-goatcounter="https://exu.goatcounter.com/count" <script data-goatcounter="https://exu.goatcounter.com/count"