Passing URL Parameters Through a Form

Follow

Note

If you are concerned about GDPR compliance or Google Analytics privacy policy please refrain from appending personal identifiable information to the the URL on form submissions.

When using a form (rather than a button) URL parameters can't automatically be passed along to another page (or the form confirmation).

Unbounce forms pass along form data, but not URL parameters. To pass your incoming URL parameters you'll need to set up hidden fields to receive any incoming parameters:

  1. Add hidden field(s) to your form by double clicking your existing form and clicking the Hidden Field button on the left of the Form Designer
  2. Name the fields the same as your incoming parameters:parameter.png
  3. If you're sending traffic to another page (not your Form Configuration), check "Append form data to URL" from the Properties Pane on the right:Screen_Shot_2012-05-01_at_9.16.12_PM.png

All form data is passed through upon submission, so your incoming URL parameters will now be passed along to the next destination (whether Form Confirmation, or another page).


Pre-filling a Form with URL Parameters

Note

If you are concerned about GDPR compliance or Google Analytics privacy policy please refrain from appending personal identifiable information to the the URL on form submissions.

With Unbounce, you can easily pre-fill your form fields with URL parameters (also known as query parameters).

What's a URL parameter you ask?

Well, among other things, a URL parameter is a way to pass data in a link to a web page. You can use URL parameters  to track different metrics in services like Google Analytics or in this case, to pre-fill your form.

A URL parameter has two parts. A variable name and a value. In example below, "coupon" is the variable name and "50_2013" is the value:

http://unbouncepages.com/puravida?coupon=50_2013

Let's say you want to pre-fill a coupon code on your form. Great.

Using the example above, you'd just need to add a "coupon" field to your form and it would automatically pre-fill with the matching query parameter. Like this:

 Screen_Shot_2013-09-13_at_4.14.01_PM.png

A popular use-case for this is when you're using Google's UTM tracking...

Google has a popular URL building tool for tagging your links with useful data (which also happens automatically if your Google Ads and Google Analytics accounts are linked). This will result in some paramaters being tacked onto the end of your Unbounce page URL which might look like this:

http://try.myproduct.com/landing-page?utm_source=google&utm_medium=ppc

To capture this data in your form, just create a hidden field for each tag and give them the same name as the tag, so for this example you'd create the following hidden fields:

Picture_1.png

Was this article helpful?
9 out of 10 found this helpful