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 think I’m in the same boat as everyone else! I can’t seem to get it to populate into the custom fields, even though they are created correctly and match exactly to the URL. I can get the first touch to populate with any issues – but the custom field. Totally different scenario – ugh!
Any simple fix that I can update/change that’s causing the outlined documentation not to push the UTM data into the custom hidden fields on the Pardot forms?
Hi Nicole, DM me the link to your form and I can take a look.
Yes, Works!
And I may have a usefull addition for someone.
I want to track whether the visitors from social media channel A convert better than those from channel B.
For instance, I can have 100 visitors and 2 form completions from channel A, and only 10 visitors but 5 completions form channel B. In the sense of conversion, even with much less visitors, channel B would outperform channel A. And using your method and little script I can measure this.
To make that easier, I made a few add ons to the procedure in your post.
First: I leave the custom fields that hold the UTM codes rewritable. So, If a prospect submits another form, the fields gets overwritten. That is intentional!
Secondly: I create for every channel a static list. So, for Channel A (and the “Springbreak” campaign) a list and channel B (and the Springbreak campaign) a seperate list.
Third: I make automations that go like: IF prospect field UTM-Campaign=Springbreak AND UTM-Source=Channel A, then add prospect to list for: campaign Springbreak, channel A (and the same for Channel B of course).
So what I get:
A simple way to see which channel was most effective AND
If Prospects submits another form, she/he (it… nowadays…) gets added to another form but still remains on the first one. So, the stats and history does not get lost. The “first touch attribution” is still there, but in addition, you record all form-submission touches. And those are visible in the “Lists” tab of the prospect record (and the activity section of course).
Now a nice “free” bonus that this process provides:
If you are consistent in using the UTM codes, you can also very quickly make analyses over multiple campaigns, to for instance check the performance of a channel in general regardless the campaign. You would then also make more general lists that collect all prospects that come from a channel, regardless of campaign. So the automation would just say: If UTM-Source=channel A, then Add to list Channel A. So the one form submission sorts the prospect in several lists at once.
But keep in mind: a prospect only gets added to a list once. So a prospect that gets in through 3 different campaigns but the same channel, is on 4 lists, but the “general channel” list only records the prospect one time. If the prospect comes in through another channel, the prospect gets added to that channel list as well. That would make the data rather “fuzzy”. You could create dynamic lists that “substract”again, or you could make it “first touch attribution”by adding som echeckbox that gets switced on by the first submission and that stops automations that would add the prosect to a general channel list from adding to such general list.
(Who said marketing automation removed the creativity from marketing?…)
You may end up with lots of lists and automations. So its a good idea to sort them into a neat folder structure so you keep your overview.
Maybe someone has some use for this little addition. I find it handy but I’m a novice at this, so please before this creates a mess somwehere in the system, tell me (us) if I overlooked something.
Keep marketing!
Best regards,
Mark
Hi Jenna,
I’m having a similar issue with most people in the comments. I followed the exact steps you mentioned but it is still not working and won’t capture the UTMs. Do you have any idea what could go wrong?
Hi Valia, DM me the link to your page and I can take a look.
Hi Jenna,
This post is great! I’ve just tried implementing using the iFrame method and the values are not pulling into Pardot when we test. Any idea what might be going wrong?
Hi Sophie, Thank you :). Please DM me the link to your page and I can take a look.
Hi Jenna,
Thank you for the article it has been very helpful! However, when we set up our custom tracking in Pardot embedded forms (iFrames) using hidden form fields, the utm tracking is only captured when someone fills out the pardot form on the landing page. When someone lands on our website and fills out a form on a page that is not the initial page they landed on, the utm tracking seems to be lost and does not auto-populate. Do you know how I could fix this issue so the utm tracking code is passed onto the other pages as the used clicks through our website?
Many Thanks
Hi Martina, Yes, that is correct. UTM parameters are not retained when navigating to different pages. To do this, you would need to set cookies with the UTM values. More information can be found here: https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/.