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 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.
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 Code
The 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
2. Create your goal conversion code
Take the following code examples (depending on your Google Analytics version), and update your account number and goal URL: Classic Analytics:
Universal Analytics: If you are using Universal Analytics, your conversion code will look differently than the code example above. Take the following code example and update the destination URL to the goal URL you chose in Step 1 of Updating your Conversion Code. In the example below, the destination URL was set to "/thankyou."
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.
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?.