1

Change how query params are read
All checks were successful
Deploy ewpratten.com / Deploy to Production (push) Successful in 1m18s

This commit is contained in:
Evan Pratten 2024-12-26 16:30:21 -05:00
parent 8e7895a6cb
commit c7a713d85a

View File

@ -1,6 +1,7 @@
<script> <script>
if (goatcounter.get_query("cr")) { let query_params = new URLSearchParams(window.location.search);
window.goatcounter = { referrer: `Custom: ${goatcounter.get_query("cr")}` }; if (query_params.has("cr")) {
window.goatcounter = { referrer: `Custom: ${query_params.get("cr")}` };
history.replaceState({}, document.title, window.location.pathname); history.replaceState({}, document.title, window.location.pathname);
} }
</script> </script>