> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeotap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Universal Analytics Integration

## Overview

Google Universal Analytics provides comprehensive analytics solutions including Event, Page Views, E-commerce, Crash, and Exception reporting. Its integration with Zeotap allows you to send real-time audiences through Symphony. You can also send data to custom dimensions and custom metrics. This will allow you to send enhanced user traits and profile attributes. In addition to this, it also allows you to send offline data that you cannot send through direct Google Analytics (GA) integration.

Zeotap uses Measurement Protocol APIs to send data to GA through server-to-server calls. With the enhanced user profile sent to GA, you can create audiences and activate them further in various Google products like Google Ads, Optimize 360 and so on.

## Prerequisites for the GA Integration

Ensure that you have the following set-up ready

* Set up a property and get the Tracking ID.
* Set up Custom Dimensions and Custom Metrics in Google Universal Analytics so that Zeotap can send data to them.

### Set up a Property and Get the Tracking ID

Perform the following steps to set up a Property and get the Tracking ID:

<Steps>
  <Step>
    Log in to the Google Analytics (GA) account.
  </Step>

  <Step>
    Go to **Admin** > **Create Property**.
  </Step>

  <Step>
    Enter a **Property Name** and then click **Show Advanced Options**.
  </Step>

  <Step>
    Select the toggle on **Create a Universal Analytics property** and enter the URL of the website that you want to track. Select the **Create a Universal Analytics property** **only** option.
  </Step>

  <Step>
    Enter your **Business Information** and then click **Create**. The **UA** property is created.
  </Step>

  <Step>
    Under the **Property** section, search for the **Property Name**, you just created.
  </Step>

  <Step>
    Click **Property Settings**. A section appears on the right side with all the relevant information about the property. Search for the **Tracking ID** and copy the details.

    <Frame>
      <img src="https://mintcdn.com/zeotap/xGzkHY-dcQy5tLit/articles/integrate-customer/Storage/integrate-customer/Create_Property1.png?fit=max&auto=format&n=xGzkHY-dcQy5tLit&q=85&s=4771904db8dccfa1cf8b5d4cd92d981b" width="1390" height="1150" data-path="articles/integrate-customer/Storage/integrate-customer/Create_Property1.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  **Note:**

  The Tracking ID is required while creating a Google Universal Analytics destination under Journeys.
</Note>

### Set up Custom Dimension and Custom Metric in Google Analytics

Perform the following steps to set up Custom Dimension and Custom Metric in Google Analytics:

<Steps>
  <Step>
    Go to **Admin** > **Custom Definitions** under **Property**.
  </Step>

  <Step>
    Choose Custom Dimension or Custom Metric based on your requirement and click **+New Custom Dimension/Metric** based on the selection.
  </Step>

  <Step>
    Add name, scope and click the **Active** checkbox to activate a Custom Dimension. Similarly, for Custom Metric, add name, scope, formatting type, minimum and maximum value and click **Active** checkbox to activate a custom metric.
  </Step>

  <Step>
    For Custom Dimensions, four scopes are provided, namely, **Hit, Session, User** and **Product**. Mostly, you may have to use the **User** scope as you need to add users based on Custom Dimensions. Similarly, for Custom Metric, two scopes are provided, namely, **Hit** and **Product**. To know more about the scopes, refer [here](https://support.google.com/analytics/answer/2709828?hl=en#zippy=%2Cin-this-article).
  </Step>

  <Step>
    Ensure that the custom dimensions are mapped to the correct index in Zeotap, else attributes will be mapped to the wrong values.

    <Frame>
      <img src="https://mintcdn.com/zeotap/xGzkHY-dcQy5tLit/articles/integrate-customer/Storage/integrate-customer/Custom_Dimension1.png?fit=max&auto=format&n=xGzkHY-dcQy5tLit&q=85&s=52e8c0033ac6b6b7d4da2a5a5c1dad83" width="2186" height="644" data-path="articles/integrate-customer/Storage/integrate-customer/Custom_Dimension1.png" />
    </Frame>
  </Step>
</Steps>

## Destination Setup

After you have applied filters or added conditions for your users in Journeys, you can activate them in Google Universal Analytics under **Send to Destinations.** A new window appears, where you can set up your destination. You can use an already existing destination from the list of available Destinations or create a new one by clicking **+ Add New Destination**.

<Frame>
  <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=8ed00bc14952fca52c418d80134b4ff2" width="1858" height="1070" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07.png" />
</Frame>

### Add New Destination

Perform the following steps to add a new destination:

<Steps>
  <Step>
    Click **Add New Destination.**
  </Step>

  <Step>
    Search for **Google Universal Analytics.**
  </Step>

  <Step>
    Click **Google Universal Analytics** and enter a name for the Destination.
  </Step>

  <Step>
    Add the **Destination Name** and **Tracking ID** (that you received above) and save the destination.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-1.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=84172286050f5a0251325a83fe0fbfc6" width="992" height="722" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-1.png" />
    </Frame>
  </Step>

  <Step>
    In the mapping screen that appears, under **Choose your Action**, select **Send events to Google Universal Analytics in realtime** as the action for sending data from the workflow created in Journeys. Under **Map the Fields**, you need to map an identifier to Google Client ID. You can also add more fields as required.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-2.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=809baa9acd9591cef06b805f9eea23dc" width="1930" height="1742" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-2.png" />
    </Frame>
  </Step>

  <Step>
    Once the mapping is complete, click **Create Destination**. The destination is created and made available for activation on Journeys.
  </Step>
</Steps>

Ensure that you map at least one attribute. Otherwise, the data does not flow to the Destination.

## Activate the Destination on Journeys

After creating a destination, next, you need to link it in the **Send to Destination** node within the workflow, as explained below.

<Steps>
  <Step>
    In the workflow, click **+** and choose **Send to Destinations**.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-3.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=f85500c1ca5e46be8906f9ae4bcc9f09" width="1032" height="542" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-3.png" />
    </Frame>
  </Step>

  <Step>
    Choose the destination from the list of available destinations by using the search feature.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-4.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=260f1b1ce1bf3a76fae4bba62c04b04e" width="1896" height="1056" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-4.png" />
    </Frame>
  </Step>

  <Step>
    Under the **Destination Details** tab, the **Tracking ID** is automatically populates based on the value that you had entered while creating the destination. However, in the **Audience Name** field, enter a name to categorise your users.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-5.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=4e1145ca734d14c1862cf2844ca47dd4" width="1904" height="1064" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-5.png" />
    </Frame>
  </Step>

  <Step>
    Under the **Destination Settings** tab, choose the Action and mapping as per your requirement.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-6.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=2ba8f1d686f02f162b4e2086bdf81657" width="1932" height="1268" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-6.png" />
    </Frame>
  </Step>

  <Step>
    Upon clicking **Save Destination**. The destination is attached as shown in the image below.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-7.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=0817e5a97bfe485188ee443a50608aef" width="1872" height="1078" data-path="articles/integrate-customer/Storage/integrate-customer/google-universal-analytics-integration/google-universal-analytics-integration-2024-08-07-7.png" />
    </Frame>
  </Step>
</Steps>

## Data Flow to Google Analytics

Zeotap sends the data to Google Analytics using the Measurement Protocol API as Event parameters.

A sample API request looks as follows:

```text theme={null}
tid=UA-XXXXX-Y&cid=1220954604.1657797468&t=event&ec=audience&ea=add&el=Active Subscribers&ni=1&cd1=Gold
```

| **Field Name** | **Field Details**     | **Comments**                                                                                                                                                                      |
| :------------- | :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tid            | Tracking ID           | This is the Tracking ID of the property where the user wants to send the data.                                                                                                    |
| cid            | GA Client Id          | GA client id is the user identifier. It needs to be sent to Zeotap through its Web/GTM implementation.                                                                            |
| t              | Hit Type              | All the requests are sent as event hit type.                                                                                                                                      |
| ec             | Event Category        | It is hard coded to audience                                                                                                                                                      |
| ea             | Event Action          | This can be added/removed based on whether user needs to be added to the audience or removed.                                                                                     |
| el             | Event Label           | This is the name of the Audience defined by the user as a node level input.                                                                                                       |
| ni             | Non Interaction Event | This is set to true as the events do not indicate a user performing an action. Non-interaction events are not taken into account when GA calculates bounces and session duration. |
| cd1            | Custom Dimension 1    | This is the user defined Custom Dimensions at GA.Ensure that these are correctly mapped in Zeotap.                                                                                |

<Frame>
  <img src="https://mintcdn.com/zeotap/xGzkHY-dcQy5tLit/articles/integrate-customer/Storage/integrate-customer/Data_flow_to_Google_Analytics.png?fit=max&auto=format&n=xGzkHY-dcQy5tLit&q=85&s=bb2809cd3f75a168bd15aecbf67312de" width="2182" height="872" data-path="articles/integrate-customer/Storage/integrate-customer/Data_flow_to_Google_Analytics.png" />
</Frame>

## Audience set up in Optimize 360

Perform the following steps to set up audience in Optimize 360 -

<Steps>
  <Step>
    Link Optimize 360 to Google Analytics by following the instructions mentioned [here](https://support.google.com/optimize/answer/7008374?hl=en). This is a one-time setup activity.
  </Step>

  <Step>
    Go to Google Analytics, select the **Admin** tab and navigate to the **PROPERTY** created as mentioned under the [Google Analytics - One-time Set up of a New Property](https://zeotap.atlassian.net/wiki/spaces/DES/pages/2953937111/Internal+Content+for+Google+Analytics#Google-Analytics---One-time-Set-up-of-a-New-Property) section above.
  </Step>

  <Step>
    Under the **Property** column select **Audience Definitions** -> **Audiences**.

    <Frame>
      <img src="https://mintcdn.com/zeotap/oGjzXQ32KVGTt8MH/articles/integrate-customer/Storage/integrate-customer/Publish.png?fit=max&auto=format&n=oGjzXQ32KVGTt8MH&q=85&s=790acbee17a006e07a2880cf757387db" width="1936" height="1014" data-path="articles/integrate-customer/Storage/integrate-customer/Publish.png" />
    </Frame>
  </Step>

  <Step>
    Select **Audience Source** -> **All Website Data** -> **Next Step** -> **Audience Definition** -> **Create New**.
  </Step>

  <Step>
    Navigate to **Advanced** -> **Sequences** -> **Filter: Include Users** -> **Select Dimension**.

    <Frame>
      <img src="https://mintcdn.com/zeotap/oGjzXQ32KVGTt8MH/articles/integrate-customer/Storage/integrate-customer/Select_Dimension.png?fit=max&auto=format&n=oGjzXQ32KVGTt8MH&q=85&s=c512990c3e86a6aec43446cf307d4eb4" width="2172" height="1212" data-path="articles/integrate-customer/Storage/integrate-customer/Select_Dimension.png" />
    </Frame>
  </Step>

  <Step>
    Create filtering criterias using Event Category(audience), Event Action(add), Event Label(Audience Name), Custom dimensions.
  </Step>

  <Step>
    Provide an **Audience Name**-> **Next** -> **Audience Destinations**. Your Optimize 360 account appears here.
  </Step>

  <Step>
    Select **Destination** and click **Publish**. Instructions on how to use the audience within Optimize are available [here](https://support.google.com/optimize/answer/6283435) (Target an Audience on Optimize 360).
  </Step>
</Steps>

## GA Limits

* It can take up to 24-48 hours by GA to process the data. The latency is variable and depends on the type of account (paid or free), amount of data etc. If you are a paid customer (Analytics 360), the data limits are increased and latency is reduced. Find more details [here](https://support.google.com/analytics/answer/1070983?hl=en#zippy=%2Cin-this-article).
* There are 20 indices available for different custom dimensions and 20 indices for custom metrics in each property. 360 accounts have 200 indices available for custom dimensions and 200 for custom metrics. Currently, we support 20 custom dimensions and 20 custom metrics to be sent to GA. Find more details [here](https://support.google.com/analytics/answer/2709828?hl=en#zippy=%2Cin-this-article).
* Audiences exported to Google Optimize are updated on a daily basis. Find more details [here](https://support.google.com/analytics/answer/2611404?hl=en#zippy=%2Cin-this-article).
