This entry is part 2 of 2 in the series Google Analytics and Pardot
  1. Google Analytics Connector
  2. Can I track Google Analytics conversions?

You can integrate Google Analytics with your Pardot marketing initiatives. Evaluate the following options on where to place your Google Analytics code to obtain successful tracking. For information on tracking your Google AdWords conversions please see our documentation on Can I track Google AdWords conversions?


Google Analytics conversion tracking requires two elements: Analytics tracking code that runs when your Pardot form is loaded, and a separate conversion code that runs when your Pardot form is completed.

If your Pardot form is located on a Pardot landing page, place your Analytics tracking code within the Pardot landing page via the appropriate layout template or via the landing page builder.

If your Pardot form is iframed onto an external page, place your Analytics tracking code within the form’s layout template.

Your Analytics tracking code is accessible in your Analytics interface via Admin > Tracking Info > Tracking Code.
analytics screen 1

You’ll want to update ‘UA-xxxxxx-x’ and ‘’ in the following example with your Analytics account number and your domain name, respectively (Analytics should provide these elements by default when you generate your tracking code). Your tracking code will look something like this:

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxx-x']);
_gaq.push(['_setDomainName', '']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


Tracking Code when your Form is on Pardot Landing Page

If the form is hosted on a Pardot landing page you will need to place the above Analytics tracking code onto the landing page–via layout template or form builder, depending on the method of styling you are using for your landing page.

Layout Template
If the landing page is using a layout template place the Analytics tracking code on the landing page’s layout template, just before the %%content%% tag in the layout template:

See the following image for an example of what this code will look like on your layout template:

layout temp ga

Landing Page Builder
If the landing page is using the Landing Page Builder, place the Analytics tracking code in a Scripts element within the builder.

Go in Pardot to Marketing > Landing Pages > edit your landing page > on step 4 ‘Landing Page Content’, click “Page Options” at the top right of the editor. In the pop up window, look for the “Scripts” option and click the “Edit” button next to it. A window will appear where you can add your unique Google Analytics code.

The code placed in the Scripts element will not be visible when the page is displayed.

lp builder ga

Tracking Code when your Form is on an External Page

If the form is hosted on an external page (a page you host) you will need to place the Analytics tracking code within the form’s layout template.

See the following image for an example of what this code will look like, when combined with your Analytics-generated tracking code on your form’s layout template:layout temp ga

Updating your Conversion Code

This will be the code you will place on your Form’s “thank you code” or on the thank you page you redirect to after the form has been submitted.

1) Log into your Google Analytics account and create a new goal (Admin > Goals > New Goal)

  • Goal Name: Goal name will appear in Conversion reports
  • Type: Destination

new goal

  • Destination: Enter the goal URL of your choice. The successful conversion will be recorded once the prospect reaches this page.  For example, you could use a thank you page or registration confirmation page.
  • Case Sensitive: Leave unchecked
  • Value (optional): Choose the value of your choice
  • Funnel (optional): Choose the expected traffic path of your choice

goal details

2) Create your goal conversion code

Take the following code example, and update your account number and goal URL:

<script type="text/javascript">
var _gaq = _gaq || [];
['_setAccount', 'UA-xxxxxx-x'],
['_trackPageview', '/thankyou']
}catch (err) {}

3) Update the form’s thank you location

Add your goal’s specific conversion code to the Thank You Code area of your Pardot form. The form’s Thank You Code can be found within the Forms Wizard Step 4 – Completion Actions.goal convers ga

If your form redirects to a separate Thank You Page rather than showing the form’s Thank You Code, place your modified Analytics conversion code on the Thank You Page that you redirect to.

Google Analytics Source Tracking

Pardot recognizes Google source tags (?utm_source=XYZ) in URLs and will enter that value into your prospect’s source field if that link was his or her first tracked touch. For more information, see How is the Source field populated?.

See Also:

Series Navigation

<< Google Analytics Connector