Passing URL Parameters Through a Form



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

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 Google Ads, and in Unbounce to pre-fill your form.

This article will explain how to pass URL parameters using hidden form fields, how to capture UTM values (such as traffic mediums, sources, campaigns, etc.), and how to pre-fill form fields

Passing URL Parameters using Hidden Fields

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 editor
  2. Name the fields the same as your incoming parameters:hidden-fields-and-parameters.png
  3. Click Done to save the updates
  4. If you're sending traffic to another page (not your Form Configuration), check the box to Append form data to URL from the Properties Pane on the right:
  5. Lastly, save & republish your landing page

You’re all set! All form data that passes through upon form submissions will pass along to the next destination (whether Form Confirmation or another page).

Capturing UTM or GCLID values using Hidden Fields

Tagging your URLs is a great way to pass detailed information about your campaign or traffic sources back to your Google Ads or Google Analytics account. You can use URL parameters to manually tag UTM values (utm_source, utm_medium, etc), or, auto-tag using GCLID values. 

Take a read of Google’s documentation on best practices for tagging your URLs and our documentation highlighting some key differences between Auto-Tagging & Manual Tagging.

Whichever way you choose, you can use Hidden Fields to capture UTM or GCLID values from your Unbounce form by following these steps: 

  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 editor
  2. These parameters can capture UTM values:utm-parameters-and-forms.png
    To capture GCLID values, set the Field Name and ID to 'gclid'. 
  3. Leave the Default Value blank
  4. Click Done to save the updates, then save & republish your landing page.

Do note that your user must arrive at the landing page with these parameter values existing in the URL for this info to be capture in the Unbounce form. 

Testing URL Parameters

To test & see if the parameter values are capturing correctly, submit a test lead to the form while on the custom URL containing the parameters, and input some test values. 

For example, suppose the URL for this custom campaign is, and the designated hidden fields have been set up in the Builder. 

After submitting a test lead on this URL, the hidden fields in Unbounce will capture the following UTM parameter values: google, email, & fall_sale. 

These values will appear in the Leads table:


Pre-filling a Form with URL Parameters

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

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

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

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



Pre-filling your form fields requires visible form fields. Therefore, you do not need the use of hidden fields, since the goal is to pre-fill form fields that are visible to your users. 

Helpful Resources 

Using URL Parameters: Google Auto-Tagging/Manual Tagging

Passing Incoming URL Parameters to Outgoing Button Links

Google’s Guide to URL Builders

Getting Started with Custom URLs

Benefits of Auto-Tagging (vs Manual Tagging)