This nifty bit of JavaScript will allow you to add a URL parameter without the page refreshing. This technique uses pushState to achieve this, here’s some more information on manipulating the browser history.
Simply copy and paste the code below onto your desired page and replace ‘?newParameter=1’ with whatever you want your parameter to be:
<script> var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?newParameter=1'; window.history.pushState({ path: newurl }, '', newurl); </script>