Change how query params are read
All checks were successful
Deploy ewpratten.com / Deploy to Production (push) Successful in 1m18s
All checks were successful
Deploy ewpratten.com / Deploy to Production (push) Successful in 1m18s
This commit is contained in:
parent
8e7895a6cb
commit
c7a713d85a
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user