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.
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:
- Google Analytics Connector Implementation Guide
- Considerations for Using the Google Analytics Connector
- 10 FAQs on the Pardot 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.






73 Comments
Hi Jenna,
I’m using an iframe code for a pardot form on a website and think I followed the option you described above correctly but the form is not populating the values from the url. Perhaps the javascript is not where it needs to be? Thanks!
Hi Krystina, DM me the link to your page and I can take a look.
Hi Jenna,
Thank you for such a helpful article!
I’m trying to collect UTM parameters via a form handler that is implemented into WordPress. I did exactly the same as you described and imbedded the script into the WordPress page, but seems that it doesn’t applies values to the hidden fields. Do you know if it works with WordPress?
Hi Kate, Yes, it works with WordPress. My guess is that maybe the javascript is not in the right spot. DM me with a link to your page and I can take a look.
Hi Jenna
It’s indeed helpful!
We are trying to capture UTM parameters using hidden fields in the form and adding the javascript code in the form header. But what happens is whenever someone lands on some webpage consisting the UTM parameters in the URL, the value of those fields get overwritten, which we don’t want. We want to retain the first value of UTM parameters (source, medium and campaign). The only thing I could see is either values get overwritten or we can store multiple responses for fields. Is there any way that we could stop the value getting overwritten once it gets captured?
Hi Diksha, So happy you found it helpful! If you don’t want to overwrite the field and you are using an embedded Pardot form (not a form handler) you can select the option to “maintain the initial value upon subsequent form submissions” within your form field settings.
Hi Jenna,
We are using iframe in our website and I followed the exact step you mentioned but still it is not working and pardot cannot capture the UTM. Could you please let me know what can be wrong. Maybe it’s the JavaScript code?
Hi Ramin, DM me the link to your page and I can take a look.
https://www.learningbeyondpaper.com/freetrial?utm_source=Ramin&utm_medium=isawesome&utm_campaign=javascript&utm_term=2021
Hi Ramin, I viewed the source and could not find the iFrame script on the page. Where did you embed it?
Hi Jenna,
Coming back to this post as I am trying to push utm_adgroup values from Google Ads to Pardot forms, but it doesn’t seem to work. Have you ever experienced passing nonstandard UTM parameters to Pardot, besides the 5 most common ones?
Hi Tanya, Yes, I have pushed non-standard UTM values to Pardot. The first thing to check is that the Pardot field name and the UTM value name MATCH. So, if you’re using the parameter name “utm_adgroup” the API field name for the Pardot field should also be “utm_adgroup”. If the field names do not match, you will need to add some JavaScript to the landing page.