Integrating with Google Analytics

Integrating Landing Page Domains with Google Analytics

You can easily integrate your Unbounce pages with Google Analytics across a domain using a simple dropdown list in Script Manager.

What you will need

  • A Google Analytics Account
  • An Unbounce Account
  • A working domain or subdomain

Step One: Getting your Website Tracking ID in Google Analytics

Getting Your Website Tracking ID

Step Two: Entering your Website Tracking ID in Unbounce

  1. Under Settings, click “Script Manager”. Click "Add your first script" and select “Google Analytics” from the drop-down menu.
  2. Enter your Website Tracking ID (found in Google Analytics)
  3. Click "Add Script Details"
  4. Two boxes will open, showing "Script Details" and "Script Usage". From the "Script Usage" box, select which subdomains you'd like to apply the Google Tracking Script to.
  5. Click "Save and Publish Script"

That's it! You've now integrated Google Analytics with the selected subdomain and its pages.

Note: Event Tracking in Google Analytics

Integrating your pages with Google Analytics using Script Manager automatically creates event tracking in Google Analytics for action items on your page.

Below is an example of the results that you would yield from this example landing page:


For more information on Script Manager in Unbounce, check out the article below:

Script Manager

Manually Adding Individual Landing Pages with Google Analytics

As an alternative from our Script Manager option, it's possible to follow a manual method of integrating with Google Analytics on your landing pages. This comes in handy with use cases that require customization to the Google Analytics script. Some examples of these use cases are:

  • Display feature tracking
  • Custom dimensions
  • Opting out of automated tracking
  • Anonymize specific IP addresses in Google Analytics

The following video and article will teach you everything you need to know to embed Google Analytics tracking into your Unbounce landing pages.

What you will need

  • A Google Analytics Account
  • An Unbounce Account


  1. Log in to your Google Analytics account
  2. Click the Admin button in the Google Analytics toolbar
  3. Select the Account you're working with
  4. Select the Property (site) you're working with
  5. Click  Tracking Info
  6. Select and copy the tracking code then return to Unbounce
  7. Paste the tracking code into your landing page's Javascript library (Select 'Head' for placement)
  8. If using a Form Confirmation Dialog, paste the tracking code into your confirmation dialog as well (Select 'Head' for placement)
  9. Save and republish your page

That's it! Google Analytics will then begin tracking metrics for your landing pages.

Note: Active visitors on your page will be immediately visible in your 'Real-Time' reports. The full visitor data will eventually populate to the rest of the reports about 24 hours later.

Adding your Form Confirmation as a Conversion Goal in Google Analytics

Adding Goals in Google Analytics lets you track when you're hitting your target objectives. If you're using the Unbounce form confirmation dialog (thank you page) and you'd like to track form submissions as a Goal in Google Analytics you can achieve that with a "regular expression."

Setting Your Google Analytics Conversion Goal Using "Regular Expression"

A regular expression allows Google Analytics to track each variant on your landing page without you having to create a new goal for each variant.

Head over to your Google Analytics account and follow these steps:

  1. Navigate to Admin, then open Goals
  2. Set up a new Goal
  3. Select Destination (under type) and then use one of the following regular expressions:

a) /.+-form_confirmation\.html

This will set a destination goal for all pages using a form confirmation dialog.

b) /landing page path/.+-form_confirmation\.html 

If you want to narrow down the goal to an individual page, specify a more defined path before the regular expression.

For example, if my landing page lives at "", my regular expression would be "/landingpage/.+-form_confirmation\.html"

c) ^/.+-form_confirmation\.html

To track a goal for a page that lives at your root domain, use this regular expression.

For example, if my landing page lives at, my regular expression would be "^/.+-form_confirmation\.html".


Removing Personally Identifiable Information (PII) from Google Analytics

You'll want to ensure that any Personally Identifiable Information (PII) is stripped out of the URL that Unbounce passes to Google Analytics so that you don't run afoul of Google's Privacy Policy.

1. Retrieve the field name for any forms fields on your landing pages collecting PII (including email address, name, phone number, address).  This is generally lower case with underlines for spaces.

    • For instance, First Name becomes first_name. You can also check this from the Design Your Form dialog in the Unbounce landing page builder - it's located right below the field's display name:


2. Log into Google Analytics and head to Admin and then View Settings.

3. Add any field names you are using to collect data across all your landing pages at the same domain under "Exclude URL Query Parameters."


Further information on Goals in Google Analytics:

Customizing Google Analytics Event Tracking

Follow these steps to customize Google Analytics event tracking

    1. Click "Javascripts" from the Page Builder.
    2. Copy the following javascript customization:
    3. In the Unbounce Page Builder, paste the customization into your javascript, select "Before Body End Tag" or "After Body Tag" from the Placement drop-down menu.
    4. Click "Save Code" and repeat this for every page desired.

Next Steps

Referral Exclusion list

If you are tracking across subdomains (visitors on crossing over to your traffics sources to '' will show as being referred from ''. 

By default Google Analytics sees landing on a different subdomain as the start of a new session. To prevent this you'll need to add your Unbounce domain to your Google Analytics properties "Referral Exclusion List". This will track the visitor between these domains to the original source. 

Customizing Your Reports

Since the data collected from this integration is handled within your Google Analytics account, check Google's site for information on building customized reports.


Adding Goals in Google Analytics: Lets you track when you're hitting your target objectives.

Conversion goal: Enables Unbounce to track the success of your landing pages (e.g., a link or button clicked on the page or a form submission).

Google Analytics placement: Head.

Property: Site that you're working with.

Powered by Zendesk