How to append SOME form data to URL, but not ALL of it?


Hello -

The analytics team here wants us to pass ONLY a hidden field we have in our form that is passing a unique number/identifier for each lead. They do not want to pass all the sensitive data like the name, email, address, etc, like it does if you check off ‘Append form data to URL’ :

They only want to pass the unique ID so the URL will look like this:

Is this possible?

Thank you


Hey @KRBishop,

One way you could achieve this is to add a web hook integration and use the URL Parameter Replacement feature.

In the example you’ve given, you’d configure a web hook with a URL like this:

When the lead is delivered to the web hook endpoint, the value contained in the field (in this case “some_field_name”) will be inserted into the URL.

URL Parameter Replacement works independently of the field map so you shouldn’t have to do anything with the field map (unless you want to map the values in the actual payload).


This is kind of what our team is needed to do too. However the page it is navigating to is another unbounce page, and we want to know who the person is with their id, rather than using a cookie etc. at that is a bit overkill for what we need.

edit: I solved it writing this in a javascript at the end of the body:

data = “data to send through”; =;

It does a quick append to the link that is already there in Unbounce’s code. You can use something to find any element’s data, and use this to add it to the lightbox link.


Hi @veddit

I tried your solution but no luck unfortunately.

I put this into the Javascript pane, setting it to “before body end tag”

utm_source is the hidden field I’ve set up

Any ideas?



Hi @anthonybs, I can help out.

Could you copy and paste the code you put in to the JavaScript so I can check what is going on please.

I think I know what’s happening :slight_smile:


Thanks @veddit. We made a few optimizations and it’s working nicely now:

      document.addEventListener("DOMContentLoaded", function(){
      var data = document.getElementById("utm_source").value; =


Brilliant. I’m glad to hear it :smile:


Heads up all, the code posed by @anthonybs has stopped working recently, perhaps due to a change in Unbounce.

Here is our fix, you may want to see if this works for you.

document.addEventListener("DOMContentLoaded", function(){
  var data = document.getElementById("utm_source").value; =