You might already be using UTM parameters to track your marketing campaigns with Google Analytics, but are you capturing that information when a prospect is created in Pardot? Capturing this data is critical to assess the value of your marketing campaign and is a lead management best practice.

What are UTM Parameters?

UTM parameters are tags you add to a URL. Marketers use this to track the traffic from a variety of sources such as email, social media, banner ads, etc. The tags can be sent back to Google Analytics and tracked, which can gauge the effectiveness of campaigns and identify the best ways to drive more visitors to your website.

hidden-fields-in-forms-3

Capturing UTM parameters in Pardot: Overview

There are two main ways to capture UTMs in Pardot. The first way is to enable the Google Analytics Connector. The connector simplifies the flow of Google Analytics data between Pardot and Salesforce. It collects data from five Google Analytics tags: campaign name, medium, source, content, and term automatically. Here are some great resources to help you get started with the Google Analytics Connector:

The second way to capture UTMs in Pardot is through hidden form fields. This method involves adding fields for campaign name, medium, source and content to each of your forms and then using a tracked URL within your marketing campaigns.

How are you embedding your form?

Select one of the options below to view the step-by-step guide.

On a Pardot landing page

Capture URL parameters on a Pardot landing page

If you have an embedded form on a Pardot landing page, capturing URL parameters is easy. Add your UTM fields to your Pardot form as hidden fields with the following settings:

  • Not required
  • Type: hidden
  • Date format: Text
  • Always display even if previously completed (checked)
  • Maintain the initial value upon subsequent form submissions (checked)*
    • * checking this will ensure that the UTM parameters will not be overwritten (first touch only).

Creating URLs

In order for Pardot to automatically populate your hidden fields with the correct data, the Field ID and the parameter name in the URL MUST match. For example, if your Pardot field name is “medium” and your URL uses utm_medium, the fields will not automatically populate. Note: This is case-sensitve.

The IDs for your form fields are field ID or API name. This can be found in Administration > Prospect Fields > Custom Fields.

If your field names follow the standard naming convention recommended by Google, you can use this Campaign URL Builder to build your URLs. If your field names are different, you can create a Google Sheet to generate URLs. Here’s a Google Sheet Template to get you started. Simply update Column G with your field names.

Alternatively, you can use the script outlined in this post to have full control over the parameter names and field names.

On a web page (iFrame)

Capture URL parameters on a web page with a Pardot embedded form (iFrame)

Capturing URL parameters via an iFrame is similar to using a Pardot form on a landing page. The only difference is that you need to pass the URL parameters from the parent page (your webpage) to the embedded (iFrame) form.

Add your UTM fields to your Pardot form as hidden fields with the following settings:

  • Not required
  • Type: hidden
  • Date format: Text
  • Always display even if previously completed (checked)
  • Maintain the initial value upon subsequent form submissions (checked)*
    • * checking this will ensure that the UTM parameters will not be overwritten (first touch only).

Add the form to your web page

Grab the iFrame script for your Pardot form. Since we will be adding some JavaScript to the web page in order to pass the parameters to the iFrame, we need to give the iFrame an ID. Here’s what my iFrame code looks like after adding the ID called “myiframe”.

Add the JavaScript to your web page to pass the URL parameters from the parent page to the embedded Pardot iFrame form.


If you used a different ID for your iFrame, other than “myiframe”, you will need to update the ID within the JavaScript.

Creating URLs

In order for Pardot to automatically populate your hidden fields with the correct data, the Field ID and the parameter name in the URL MUST match. For example, if your Pardot field name is “medium” and your URL uses utm_medium, the fields will not automatically populate. Note: This is case-sensitve.

The IDs for your form fields are field ID or API name. This can be found in Administration > Prospect Fields > Custom Fields.

If your field names follow the standard naming convention recommended by Google, you can use this Campaign URL Builder to build your URLs. If your field names are different, you can create a Google Sheet to generate URLs. Here’s a Google Sheet Template to get you started. Simply update Column G with your field names.

Alternatively, you can use the script outlined in this post to have full control over the parameter names and field names.

A Pardot form handler

Capture URL parameters using a Pardot form handler

Add your UTM fields to you Pardot form handler and add them to your form as hidden fields.

Add some JavaScript code to your landing page or web page

Place this piece of code on your landing page or web page. This will parse the URL parameters and put the values into the hidden fields on your form.


Creating URLs

Use this Campaign URL Builder to build your URLs.

Questions?

Send me a tweet @jennamolby, leave a comment below, or book a Peer Chat.

Author

I'm a Freelance Marketing Operations Consultant With 15 years of experience in Marketing Operations, I’ve worked with a wide range of tools including Salesforce, Marketing Cloud Account Engagement (Pardot), Marketo, and many other sales and marketing platforms. I help teams optimize their tech stacks, improve processes, and get accurate, actionable reporting. Whether it’s setting up your Marketing Automation Platform, building Salesforce reports, managing lead lifecycles, tracking attribution, or integrating your tech stack, I ensure everything is aligned to drive real results.

73 Comments

  1. Jessica Sinha Reply

    Jenna, are UTM parameters only used for pages with forms on them? How are they used on pages with no forms on them, to gauge for example, how much traffic (and from where) is on an ungated blog post? I would love to see if you have a post on this already or your thoughts on best resources to set something like this up for content metrics.

    • Jenna Molby

      Hi Jessica, Yes, they are only used for pages with forms on them. If you want to use for pages with no forms, you can look into setting a cookie with the UTM values. Then, when a form is submitted, you look at the cookie values.

  2. John O'Toole Reply

    We plan to use the Google Analytics Connector, but I am wondering if you know of a way to also capture the original landing page URL in a pardot field? Thanks Jenna!

  3. So to capture last touch is it really as simple as unchecking the “maintain initial value” checkbox?
    If so, does this overwrite the GA connector fields on the Prospects Pardot record?

    • Jenna Molby

      Yes, it is, but it has to be a custom field. The GA connector fields will not be overwritten.

  4. If we want the field to capture a new UTM value each time the form is submitted, should I be checking the “Do Not Prefill” box, or will that not make a difference?

    • Jenna Molby

      Hi Marah, Yes, you would want to ensure that the “do not prefill” box is checked and same with the “display if already completed” box.

    • Jenna Molby

      Hi Shailendra, Thank you! Looks like the script on the webpage is not working. Do you know where your web developer placed the script? I don’t see it on the page.

Write A Comment