Newer post available

Hi there, you are viewing an old post that is a bit outdated. Click here to view the post with the latest instructions.

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 in order 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 be able 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 be used to gauge the effectiveness of campaigns and identify the best ways to drive more visitors to your website.

hidden-fields-in-forms-3

Create New Fields

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

hidden-fields-in-forms-2

Add The New Fields to Your Pardot Forms

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

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.

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.

Questions?

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

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.

57 Comments

  1. Hi Jenna, Can you please let me know if the html code in form would same as below or anything else to add.


  2. Hi!
    Im looking to add the utm_campaign field displayed in the URL with a form handler.
    However, the “utm source” field is not availlable in the Prospect Field dropdown in pardot?

    Am i missing something?

    • Jenna Molby

      Hi Jonathan, If you are looking to map to the standard ‘source’ field it’s called ‘source’ not ‘utm_source’. Cheers, Jenna

  3. Hi Jenna,
    Would it be possible to use the same steps, but have those utm fields as record and display multiple responses?

  4. Hi Jenna,
    how do I prevent this mechanism to override existing data? I only want to capture first-touch source and keep that original value.

    Thanks!

  5. Hi Jenna.
    Thanks a lot for your article.
    One question regarding the field “source” – you are working with the standard field, right?
    I thought, that one needs to use the FIELD name in the brackets – so the code would look the following:
    var source = getParameterByName(‘source’);
    but in your case it looks like this:
    var source = getParameterByName(‘utm_source’); –> Same for: document.querySelector(“p.source input”).value = source;
    Or that doesn´t matter?
    Looking forward to your reply.
    Many thanks and best regards,
    Yvonne

Write A Comment