Button setting: external URL with wildcard

Hi all, I’m a total beginner when it comes to Webflow, so please excuse me if the question is silly. I would like it so that when user goes to example.com/?mutableVariable=val and click a button, they are directed to external.com/?mutableVariable=val. Is this doable, or do I have to accomplish this by inserting a Javascript snippet or something like that?

Thanks all! Would really appreciate some guidance on this.

If you’re trying to pick up querystring params dynamically and pass them through on a button click, you need JS to do that.

Here’s a library I built that makes this easy to add using a custom attribute, in your case wfu-query-param=mutableVariable. However it was built for UTM referral tracking and the client needed that to carry through the site- so all url params get passed into all standard links as well.

Thank you so much for your response!! In that case, I assume that webflow would allow me to add custom JS code to the button element? The official doc seems to only talk about adding JS code to a page.

The JS is added to the page, the custom attributes are added to the button to target it and configure it.