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

  • 23/06/2020
    How to Use Pardot Form Handlers

    Pardot form handlers allow you to use your own forms to post your data to Pardot. A Form handler is a great alternative to use instead of Pardot iFrame forms. They allow you to fully customize the look of your form and submit data to more than 1 database. In this tutorial, you will learn how to create a form handler from scratch.

  • 02/06/2020
    7 Tips for Organizing Your Campaigns in Salesforce

    Salesforce campaigns can help you track each of your marketing initiatives in detail. These can include online advertisements, emails, or more specialized marketing events such as demos and tradeshows. You can use campaigns to analyze how many leads you are generating, how much pipeline you are building, and how many deals are closing as a result of your marketing efforts. However, in order to track and analyze your campaigns effectively, you need to have an organizational structure in place. Whether you are setting up campaigns for the first time or looking for a way to get more out of campaigns, here are 7 tips to help you get started with your campaign organization.

  • 05/03/2020
    How to Create a Better Date Picker Within Pardot Forms

    Want to be able to restrict the date range of a date picker within your Pardot forms? The default date picker with Pardot does not provide this option, but with a couple of lines of JavaScript, you can enhance the functionality of the date picker. In this tutorial, I’ll show you how to use the jQuery UI date picker within your Pardot form.

7 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