How To Use UTM Parameters to Capture Lead Source in Pardot Part 2


In part 1, I covered how to use UTM parameters to capture lead source when you are embedding a Pardot form on a Pardot landing page. In this post, I will cover how to implement the same method using an iFramed form on a web page.

Note: step 1 and step 2 are the same as the instructions outlined in part 1.

Step 1: Create new fields and add them to your forms

The first thing you need to do is create 2 new fields in Salesforce and in Pardot and map them. You don’t need to create a field for utm_source, we will use the standard source field in Pardot.

  1. utm_medium
  2. utm_campaign


Next, add the fields to your Pardot form. All 3 fields should be hidden and not marked as required.

Step 2: Add Some Code to Your Landing Page Templates

This piece of code will parse the URL parameters and put the values into the hidden fields within your form. This code can be placed within your landing page template or within your form in the below form section.

Note: If you don’t use the field names outlined in this tutorial, you might need to update the JavaScript to include the correct field names.

Step 3: Embed your form on your web page

Use the standard iFrame code Pardot provides to embed your form on your webpage.

Step 4: Give your iFrame and ID and add the JavaScript

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 that will pass the URL paramters 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.

Create URLs and Test

Now you’re ready to start creating URLs and testing your form. Use this handy URL builder to create your links and then fill out the form to see if the values go into Pardot.


Send them to me via email, send me a tweet @jennamolby, or leave a comment

Related Posts

  • 15/10/2020
    How to Use Flex Fields in Pardot

    Flex fields are custom fields that can be used over and over again to limit the number of one-time-only fields within Pardot and Salesforce. They contain data that is required temporarily to execute a specific event or campaign. Once the data is no longer needed, the fields can be reset to blank using an Engagement Program or Automation Rule

  • 04/10/2020
    How To Embed a Pardot Form on Your Website The Right Way

    Pardot offers 2 methods for embedding forms on your website; embedding using an iframe, and form handlers. While the embedded iFrame forms allow marketers to have control over updating and configuring the forms, using an iFrame isn’t always ideal for website usability. In this tutorial, I will show you how to take advantage of the Pardot iFrame forms and make it look great embedded on your website.

  • 23/09/2020
    7 Ways Pardot Users Can Use Chrome Developer Tools For Troubleshooting & Testing

    Chrome Developer Tools is widely used by developers to help edit pages on-the-fly and diagnose issues. Pardot users can use DevTools to troubleshoot and test landing pages and forms. In this post, I’ll show you 7 ways you can use DevTools, including how to identify errors on a landing page, how to customize the CSS of a form and how to view hidden form field values.

11 comment(s)

    26/05/2020 at 5:51 pm

    Jenna, I have a form thats on multiple pages and am trying to pass a value to a hidden field using the URL parameters. But when I try and the parameters to the URL on my Pardot landing page I am getting an error that i cant use "?" in my URL. Am I missing something?

    • Jenna Molby
      to JARED DAVIS

      28/05/2020 at 10:57 am

      Hi Jared, That is strange. Is there only one "?" in your URL? Are you using any other special characters? Cheers, Jenna

  • Tommy Hunkins

    17/04/2020 at 11:54 am

    Hi Jenna - this is supposed to populate the fields within Pardot, not just pass them to Google Analytics, right?

    • Jenna Molby
      to Tommy Hunkins

      17/04/2020 at 12:00 pm

      Hi Tommy, Yes, this is correct. This should populate the fields within Pardot. Cheers, Jenna

  • Abby Karcz

    30/04/2019 at 4:54 pm

    Hi Jenna! Can you tell me how this would work for Form Handlers? I've been using this method on my Pardot forms, but now we're transitioning to Form Handlers. Thank you! Abby

  • Rob Woestenborghs

    12/04/2019 at 12:06 am

    hi jenna, great tips and we use them a lot. we also send the utm parameters to Salesforce (via contact to campaign member) and then we connect them to the opportunities that were generated via that campaign to have better channel reporting. But we notice that we can not always capture the utm parameters because of 2 reasons: 1. visitors visit other pages of our website before submitting form and in that case the utm parameters are not showed in url anymore 2. traffic sources were you can't control the utm parameters (e.g. organic search). do you have an idea if there is solution for that ? is there a way top capture that source/medium data as well ? Keep up the good work! Rob

  • Cole McIntyre

    06/03/2019 at 3:04 pm

    Hey Jenna! Pleasure to connect with you directly! I'm on the Pardot Specialist team over at Salesforce and UTMs are one of my favorite topics. I love sharing these articles with clients. Very well written and user-friendly. Quick thing I noticed that I figured you'd appreciate seeing - it looks like you use the same "add some code to your landing page templates" verbiage in this article that you use in part one here ( even though this article seems to be focused more on iframed forms on the site as opposed to Pardot landing pages. Let me know if I'm missing something! But figured I'd pass along as a friendly observation - confused me at first glance since it isn't speaking to how the code would be embedded on the website page in this case. Anyway, thanks for all your amazing content - you probably know this, but our team shares your articles with our clients constantly :) So thanks for all that you do!

Leave A Comment

Your email address will not be published. Required fields are marked *

About Me

Welcome to my blog, where I share, tips, tricks, thoughts and solutions that I learn in my daily life as a Marketing Operations leader.

Most Commented
Popular Posts