Pass query param to every page

How can I pass a query param from one page to another. I have tried inserting the following code into the header in a script tag but it doesn’t seem to do anything.

https://stackoverflow.com/questions/55414111/how-to-pass-url-parameters-across-all-pages-internal-links-in-a-site-with-javasc/55414202

This should work also, but the tag isn’t executing and I have no idea why

<!-- URL Param pass -->
<script>
document.querySelectorAll('a')
        .forEach(el => el.attributes.href.value += window.location.search);
</script>
<!-- End URL Param pass --!>

Did you find an answer? I’m trying to figure this out myself as well.

Hey sorry, just saw your response. No I was never able to figure it out and received no support from webflow. Seems like they don’t answer any questions