- Google Analytics Connector
- 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 iframed onto an external page, place your Analytics tracking code within the form’s layout template.
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). Your tracking code will look something like this:
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.
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:
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.
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.
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
- 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
2) Create your goal conversion code
Take the following code example, and update your account number and goal URL:
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?.