Passing a querystring variable to a hidden field


Is there an easy way through Unbounce to pass the value of a querystring variable in the URL to a hidden field to be submitted with the form? I’ve done this in the past by setting a cookie that follows the user around as they navigate a site but never just pulling right from the querystring.

Any assistance would be greatly appreicated!

Passing Variable from Cookie to Lead Object/Form

That’s fantastic! Thanks for the help and quick response.


My pleasure!


hi Carter,

I have an issue with passing inf_field_FirstName, all other variables are getting populated correctly except of that one and i can’t figure out why!

thanks for your help



And if i wanted to place the hidden fieled in the javascript code for tracking what is the protocol to pull the information through and place in the tracking url

hidden field is aff_sub

ie script looks like this g/aff_l?offer_id=191&aff_sub= {aff_sub}

what do i use to populate aff_sub


Hi Craig, as long as you have a hidden field (or visible field) with the same exact name as the query string in the URL, we will automatically populate the value of that field with the value of the query string. For example, a field in your form named first_name would capture the value of “Carter” if the user accesses your page from the url:

Hope that helps!