Solutions keyboard_arrow_down keyboard_arrow_up
Our Solutions
Ontraport's solutions work together to give you everything you need to run your business in one centralized, easy-to-use platform.
Resources keyboard_arrow_down keyboard_arrow_up
Resources
Find free content on the latest marketing strategies, using Ontraport in your business, and finding the right software.
Visit the blog
University Pricing Chat
clear
Integrate Ontraport with Google Analytics
Last updated on: July 5, 2023

Universal Analytics properties will stop collecting data on July 1, 2023. If you currently use Universal Analytics, create a Google Analytics 4 (GA4) property to continue tracking. You may be able to reuse your existing Universal Analytics tagging for your GA4 property. Check out this article to learn more.

Google Analytics provides valuable insights into website traffic, user behavior, and key performance metrics. This information helps optimize your online presence and drive growth.

Once set up, you can see which Google Ads are converting, and you’ll gain valuable sales insights such as your average order value and the sales cycle length.

Add the Google Analytics tracking code to your landing pages so you can collect information about your web traffic. From your Google Analytics account, you can see the number of visitors to your page, where your traffic is coming from and more. All account levels can set up a basic integration with Google Analytics.

Higher Ontraport account levels allow you to set up deep funnel conversion tracking with Google. This integration sends contact data to Google Analytics based on mid and deep-funnel conversion data.

Check out our pricing page for more information.

This article walks you through setting up Google Analytics tracking on your site. And it shows you how to customize the prebuilt automation map to send your deep funnel conversion data to Google.

Table of contents

Set up your Google Analytics Account
Install your Google tag
Add deep funnel conversion tracking
Enable advanced Google tracking fields
Set up your conversion events in Google Analytics
Collect information to fill in your automation map
Customize your prebuilt automation map
Send specific product information
Enable Google Ecommerce Tracking
Create a property
Set up your Ontraport order forms
Set up your thank you page

Set up your Google Analytics Account

  1. Sign in to your Gmail account.
    • If you don’t already have one, sign up for one here.
  2. Click here to go to Google Analytics.

  1. Click Start measuring.
  2. Add your account name and customize your account data sharing settings.

  1. Click Next.
  2. Create a property. Think of the property as a website or app. You can set up more than one property if you want to integrate multiple sites.

  • Add your property name.
  • Choose your reporting time zone.
  • Select your currency.
  1. Click Next.
  2. Describe your business. Select your industry and business size.

  1. Click Next.
  2. Select your business objectives.

  1. Click Create.
  2. Check the “I also accept the Data Processing Terms as required by GDPR.” checkbox and click I Accept.

  1. On the next page, click Web from the Choose a platform section.

  1. Add your website URL and name your stream.

  1. (Optional) Click settings icon to change your measurement settings.
  2. Click Create stream.

Install your Google tag

Back to top

After you create a stream, go to the Install your Google tag page. Copy your Google tag and add it to your Ontraport page. Here’s how:

  1. Click Install manually.
  2. Copy your Google tag.

  1. In Ontraport, open the page or pages you want to add tracking to.
  2. Click SettingsCustom codeHeader.
  3. Paste your Google tag into the header section.

  1. Save and publish your page.
  2. Repeat these steps on all pages you want to add Google tracking to.

Add deep funnel conversion tracking

Back to top

With this feature, marketers can set up an advanced Google tracking integration to obtain more comprehensive data about their conversions. Check out our webinar with Three Ventures to see how it all works.

This advanced integration allows you to bridge the gap between Google and Ontraport. You can connect the data about your anonymous leads tracked by Google and your identified leads tracked by Ontraport. This integration makes it possible to see if your ads drive traffic that purchases from you. Viewing your conversions from Ontraport in Google lets you focus your marketing budget on ads that drive sales — not just clicks or opt-ins.

Turn on UTM tracking in your account if you haven’t already. Enable advanced Google tracking fields in your account to get started. Then download and publish a prebuilt automation map to send your data to Google, and set up your Google Analytics account to use that data.

Enable advanced Google tracking fields

Back to top

This feature lets you capture the Google Analytics Client ID and GCLID parameters when visitors submit your forms. When you enable deep funnel conversion tracking, it adds two new fields to your contact records, “GA Client ID” and “GCLID.”

As soon as you enable this feature, Ontraport will add your new fields. And when your visitors submit Ontraforms or forms on Ontraport Pages, Ontraport will save their IDs automatically.

  1. Log in to your Ontraport account.
  2. Go to my profileAdministrationAdvanced Settings.
  3. Toggle Deep Funnel Conversion Tracking on.

Set up your conversion events in Google Analytics

Back to top

Conversion events track and measure the actions taken by users on your website or app that are valuable to your business. These actions include purchasing, submitting a lead form, or viewing a key page on your website. By defining these actions as conversion events in GA4, you can track how often they occur and gain insight into the behavior of users who take them.

Ontraport’s prebuilt automation map includes triggers related to these conversion events, so it is best to set them up before editing your automation. Here’s how:

  1. Log in to your Google Analytics account.
  2. Hover over settings icon on the bottom left side of the screen and click Admin.
  3. Click ConversionsNew conversion event.
  4. Name your event.

  1. Click Save.
  2. Repeat steps 3-6 to create a conversion event for each action you want to track.

Collect information to fill in your automation map

Back to top

To customize the prebuilt automation map, you’ll need to have your:

  1. Measurement ID
  2. Secret value
  3. Conversion event names

Here’s where you can locate this information:

Measurement ID

Back to top of section

Measurement IDs identify web data streams you’ve added to your Google Analytics 4 property.

  1. Log in to your Google Analytics account.
  2. Hover over settings icon in the bottom left side of the screen and click Admin.
  3. Then click Data Steams.
  4. Click on your data steam, and you’ll see your measurement ID in the Stream details section.

Secret value

Back to top of section

The GA4 Measurement Protocol API Secret value authenticates requests sent to the Google Analytics 4 Measurement Protocol API. Google generates a unique secret key when you create a new Measurement Protocol API Secret in the Google Analytics 4 property settings.

The Measurement Protocol API lets you send data directly to Google Analytics servers from your Ontraport account.

Here’s where you can find your secret value:

  1. Log in to your Google Analytics account.
  2. Hover over settings icon in the bottom left side of the screen and click Admin.
  3. Then click Data Streams.
  4. From your Web Stream details page, click Measurement Protocol API secrets from the Events section.

  1. Locate your secret value from the API secrets section.

  • If you don’t have a secret value, click Create, add a nickname then click Create again.

Conversion event names

Back to top of section

When you customize the prebuilt automation map in Ontraport, you’ll use your conversion event names. Here’s where you can find that information:

  1. Hover over settings icon in the bottom left side of the screen and click Admin.
  2. Click Convestions.
  3. Copy your event names from the Conversion name column.

Customize your prebuilt automation map

Back to top

This prebuilt automation map uses webhooks to send your mid and deep funnel conversion data back to Google.

  1. Click here to download the “Sending Deep Funnel Conversions to Google Analytics with GA4” map.
  2. Follow the automation checklist to customize it.
  3. The checklist will ask you to add the information you collected above.
  4. Publish your automation.

Send specific product information

Back to top

The prebuilt automation map includes a trigger for your customers to purchase products. This trigger will count any purchase as a conversion event. If you sell more than one product at a time on a single order form, or people buy more than one of your products at a time, we recommend that you use Google Ecommerce Tracking.

You can also customize your map to send product specific information to Google.

  1. Open your “Sending Deep Funnel Conversions to Google Analytics with GA4” map.
  2. Click Edit to make updates to your automation.
  3. Click on your “Product is purchased” trigger to open its settings.
  4. Select a specific product in the “Purchases” dropdown.


"items": [Page//
{
"item_id": "PRODUCT_ID",
"item_name": "PRODUCT_NAME",
"coupon": "COUPON_NAME",
"discount: "DISCOUNT_VALUE",
"price": "ITEM_PRICE",
"quantity": QUANTITY
}
],

  1. Click Done.
  2. Click on the Webhook element below your trigger to edit it.
  3. Add this array to your request:
    • Learn more about item parameters here.
  4. Replace the purple text with your product’s information.
    • Remove “coupon” and “discount” if you don’t offer them for your product.

  1. Click Save.
  2. If you want to add multiple products, copy your “Product is purchased” trigger and repeat steps 3-9.
  3. Publish your automation map.


Enable Google Ecommerce Tracking

Back to top

This feature sends your sales information to Google Analytics. To do this, create a property in Google Analytics, edit your order form’s settings and add a script to your thank you page.

If you make manual transactions or use the API to create purchases, Google Ecommerce Tracking will not work. This is because these methods do not have a thank you page to send the necessary data to Google.

This feature is available to some account levels. Check out our pricing page to learn more.

Create a property

Back to top

A property is a website or mobile app that is associated with a unique tracking ID. If you have not set up a Google Analytics 4 property, follow the steps above to set up your Google Analytics Account.

Set up your Ontraport order forms

Back to top

  1. In your Ontraport account, select an order form.
  2. Go to your form settings, and scroll down to the “Advanced” section.

  1. Click the checkbox “Send Google Ecommerce Tracking parameters to landing/thank you page.”
  2. Click Save.
  3. Click PublishSave & Publish.
    • When your customers make a purchase, the form will send Google’s ecommerce tracking parameters to your thank you page.
    • If you’re using an Ontraform, you don’t have to re-embed the form on your website.

Set up your thank you page

Back to top

  1. Install your Google Tag on your page if it’s not present already.
  2. Copy this script:

<script src="https://optassets.ontraport.com/opt_assets/static/js/ga4_ecommerce.js"> </script>

If you want to send your purchase details in a currency other than USD or send more information to Google Analytics, copy and modify this script instead.

  1. In Ontraport, go to Pages and select the thank you page you’ve selected in your order form’s settings.
  2. Click SettingsCustom Code.
  3. Select the “Body” tab, copy and paste your script into the text area, then click Done.

  1. Save and publish your thank you page.
  2. Wait 24 hours for the data to populate into Google Analytics, and test your order form. Then check your Google Analytics account for your purchase information.

Related university lessons
Building custom reporting automations
Learn how to use automations to create detailed custom reporting on your business processes — and step up your oversight on key performance indicators.
Google ecommerce tracking
Set up Google ecommerce tracking so you can analyze detailed sales activity on your site — and make informed decisions about your business.
Deep funnel conversions
There is a way to know — rather than guess — if the money you spent on ads actually resulted in conversions. With deep funnel conversions, you can see if the people you tracked at an early stage of your funnel are the same people who ended up buying. Maximize your ad dollars with clearer tracking by setting this up in Ontraport.
arrow_drop_down_circle
Divider Text
Related support articles
arrow_forward
Deep funnel conversion tracking with Facebook
arrow_forward
View email performance
arrow_forward
Sales reports
 Pro tips
Tip #1: When testing GA tracking and events, you can see the data you're sending to Google using this Chrome plugin in conjunction with your browser's console.
Tip #2: View additional debugging information here.
Tip #3: When you're testing your automation, you can edit the request URL of your webhooks to help debug. Here's how:
  • Change the URL in each webhook request.
    1. From: https://www.google-analytics.com/mp/collect?measurement_id=**add measurement id here**&api_secret=**add secret key here**
    2. To: https://www.google-analytics.com/debug/mp/collect?measurement_id=**add measurement id here**&api_secret=**add secret key here**
  • Trigger an event on the automation map.
  • View the response from Google in your Ontraport account’s webhook logs.
Features
Company
Resources
Live events
Access
© Ontraport 2024
playlist_add_check
PCI DSS, Level 1
security
Privacy Shield Certified
[bot_catcher]