Adding Marketo Measure JavaScript to Pardot

Pardot forms require additional handling within the form template beyond putting script on the site in order for Marketo Measure to recognize form submissions. The process is simple; it only requires placing the Marketo Measure tracking script into the Pardot form template.

Step by Step Instructions

Once you’ve logged into your Pardot account, follow the steps below.

  1. Navigate to Marketing.

  2. Click on Landing Pages.

  3. Select Layout Template.

  4. Determine the appropriate Layout Template and click Edit to the right.

  5. Copy and paste the Marketo Measure JavaScript code right before the close header tag on your HTML page.

    <script type="text/javascript" src="" async=""></script>

  6. Follow these steps for all applicable Landing Page Layout Templates.

  7. Make sure the Marketo Measure JavaScript is on the general site page as well.

    Within the Pardot Layout Template, the code will look something like this:

<script type="text/javascript" src="" async=""></script>

Additional Notes

If the Pardot IFrame has the following HTML tag:

<base href="">

And the IFrame itself is actually on a secure page (HTTPS) instead of a nonsecure page (HTTP), when we try to load our script on the Pardot IFrame, the browser will try to load an HTTP version of our script on an HTTPS page which will fail and prevent us from tracking. The solution is to update the script on the Pardot IFrame to load the secure version of our script:

<script type="text/javascript" src="" async=""></script>

As well, there may already be other tracking code snippets in this area, such as a Google Analytics code. Be sure to separate them by a semicolon ; and a single space, like shown in this example:

<script type="text/javascript" src="" async=""></script>; <script async="true" type="othercode_example" src="otherfile_example.js" ></script>

On this page