Please note that the codes samples and screenshots here differ based on whether you're using Classic Analytics or Universal Tracking. Make sure you're using the code from your Google Analytics account. If you're not sure which version of Google Analytics you're using, see Google's documentation here.
Getting StartedGoogle 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.
You'll want to update 'UA-xxxxxx-x' and 'yourdomain.com' 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). Classic Analytics tracking code will look something like this: Universal Analytics tracking code will look similar to this:
Tracking Code when your Form is on Pardot Landing PageIf 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 TemplateIf 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:
Landing Page BuilderIf the landing page is using stock templates in the Landing Page Builder, place the Analytics tracking code in a Scripts element within the builder.
- Navigate to Marketing > Landing Pages.
- Select a landing page to edit.
- In step 4, Landing Page Content, click Page Options at the top right of the editor.
- In the pop up window, look for Scripts and click edit. A window will appear where you can add your unique Google Analytics code.
- Click Done.
Tracking Code when your Form is on an External PageIf 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:
Updating your Conversion CodeThe code will differ based on whether you're using Classic Analytics or Universal Tracking. If you're not sure which version of Google Analytics you're using, see Google's documentation here. 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
- Case Sensitive: Leave unchecked
- Value (optional): Choose the value of your choice
- Funnel (optional): Choose the expected traffic path of your choice
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.