Page 1 of 1

How to Pass UTM Variables to a Pardot iframe

Posted: Sun Dec 22, 2024 6:09 am
by nishat957
This blog was written before Pardot was renamed to Marketing Cloud Account Engagement. You can read more about the name change and what it means here.

UTM variables are incredibly useful for marketing attribution. They tell us which of our prospects came from particular marketing activities, such as LinkedIn ads, for example. When it comes to tracking UTM variables and passing these into Pardot, forms embedded in a Pardot iframe can cause some issues, as there is a lack of connection between the external page that the form sits on (i.e. on a WordPress web page) and the Pardot form within the iframe.

However, this is nothing that a bit of custom cambodia phone number list Javascript can’t fix! Whilst you can enable the native Google Analytics connector within Pardot, this will only populate UTMs on a first-touch basis, and you are restricted to the five default variables. Our solution allows you to collect custom variables, and you can collect them over multiple form submissions. Keep on reading to learn how to pass UTM variables to a Pardot iframe (without using the Google Analytics connector) in three easy steps.
Image

Note: Custom Javascript is sensitive to cases, punctuation, and formatting. We strongly advise against using this tutorial unless you are comfortable with editing code yourself.

Step 1: Custom fields
Step 2: Below-form code
Step 3: Landing page code
Pardot Training Banner

Step 1: Custom fields
Before we can track any field values, we first need to create the custom fields. For standard UTM tracking, you will want to create the following fields, exactly as shown:

utm_source
utm_medium
utm_campaign
utm_content
utm_term
Once these are created, you can add them to your forms. These will each need to be added as a hidden field with the text type that is not required.

If you would like to track any other field values, create these in the same format; spaces should be formatted as underscores, and all lowercase letters.

Step 2: Below-form code
Place the following Javascript in the below-form section of your Pardot form: