> ## 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 Analytics 4

## Overview

Google Analytics 4 is an analytics service that enables marketers to measure traffic and engagement across the websites and apps. Integrated with Zeotap it helps marketers to improve data tracking, incorporate machine learning capabilities, cross-device tracking, create custom audiences and improve privacy controls.

## Supported Identifiers

This integration supports GA Client ID.

## Available Actions and Supported Features

The following table lists the available action types for the integration and the supported features for each action type:

| Action Name                            | [ID EXTENSION](/articles/segment-customer/extend-your-audience#id-extension) | [DELETE](https://docs.zeotap.com/articles/#!integrate-customer/delta-upload-and-delete-functions) | [DELTA UPLOAD](https://docs.zeotap.com/articles/#!integrate-customer/delta-upload-and-delete-functions) |
| :------------------------------------- | :--------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------ |
| Send identifiers to Google Analytics 4 | ✅                                                                            | ✅                                                                                                 | -                                                                                                       |

## Components of Google Analytics 4

Ensure that you have details about the below components of Google Analytics available before creating a Destination.

### Obtain the Measurement ID and API Secret

You may already have a Property created in your Google Analytics 4 account. If not, then perform the following steps to create a Property:

<Steps>
  <Step>
    Log in to the Google Analytics 4 account.
  </Step>

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

  <Step>
    Enter a **Property Name** and then click **Next**.

    <Frame>
      <img src="https://mintcdn.com/zeotap/5K-Zf-MYwWXwJWp5/articles/integrate-customer/Storage/integrate-customer/create_property.png?fit=max&auto=format&n=5K-Zf-MYwWXwJWp5&q=85&s=1a2e3b8f750ddf78436fa75acfd621d6" width="1844" height="1564" data-path="articles/integrate-customer/Storage/integrate-customer/create_property.png" />
    </Frame>
  </Step>

  <Step>
    Under the **Business information** section make the appropriate selections as per your business requirement and then click **Create**. The GA4 property is created.
  </Step>

  <Step>
    Within a Property, a Data Stream has to be created. Note that you may already have a data stream created. If not, then perform the following steps to create a Data Stream:

    a. Go to the created property > **Data Streams** > **Web Platform** (Currently we support web implementation of GA4 only).

    b. Enter the **Website URL** for which GA4 has to be configured and the **Stream Name**.

    c. Click **Create Stream**.
  </Step>

  <Step>
    Click on the created Data Stream. A section appears on the right side with all the relevant information about the Data Stream.
  </Step>

  <Step>
    Copy the **Measurement ID** and use this to create the GA4 Destination.

    <Frame>
      <img src="https://mintcdn.com/zeotap/vUbSUkv-YgM0J3q4/articles/integrate-customer/Storage/integrate-customer/measurement_id.png?fit=max&auto=format&n=vUbSUkv-YgM0J3q4&q=85&s=75e9fdba7fec7a1fc64d5d7ef06d3208" width="2744" height="1834" data-path="articles/integrate-customer/Storage/integrate-customer/measurement_id.png" />
    </Frame>
  </Step>

  <Step>
    Scroll down and click the **Measurement Protocol API secrets**. A section appears on the right side displaying the existing API secrets and an option to **Create** a new one.
  </Step>

  <Step>
    Copy the **API Secret** and use this to create the GA4 Destination.

    <Frame>
      <img src="https://mintcdn.com/zeotap/0tFtKK3bg3ChrHL3/articles/integrate-customer/Storage/integrate-customer/api_secret.png?fit=max&auto=format&n=0tFtKK3bg3ChrHL3&q=85&s=3fb53c71a2ee395852cf962cb551bb55" width="2920" height="656" data-path="articles/integrate-customer/Storage/integrate-customer/api_secret.png" />
    </Frame>
  </Step>
</Steps>

## Create Custom Dimensions

After successfully creating a Property and Data Stream as mentioned above, the next step requires you to create the Custom Dimension. Note that in order to send events and audience to be identified at GA4's end and this integration to work, it is mandatory to create the custom dimensions as mentioned below.

<Steps>
  <Step>
    Navigate to **Configure** > **Custom Definitions > Create Custom Dimensions**.
  </Step>

  <Step>
    Create two custom dimensions, as explained below.

    * Custom Dimension 1

      * **Dimension Name** - `Audience Name`
      * **Scope** - `Event`
      * **Description** - As per your requirement
      * **Event Parameter** - `audience_name`
    * Custom Dimension 2

      * **Dimension Name** - Zeotap Event Type
      * **Scope** - `Event`
      * **Description** - As per your requirement
      * **Event Parameter** - `zeotap_event_type`

    <Frame>
      <img src="https://mintcdn.com/zeotap/Yl1hDNuL3ftKLMn2/articles/integrate-customer/Storage/integrate-customer/custom_dimension.png?fit=max&auto=format&n=Yl1hDNuL3ftKLMn2&q=85&s=5acf925ad4ad47e7ab3d1ede78e6a365" width="2922" height="1108" data-path="articles/integrate-customer/Storage/integrate-customer/custom_dimension.png" />
    </Frame>
  </Step>
</Steps>

## What Zeotap does for the Integration to Work?

Zeotap sends a **Custom Event** named `zeotap_event`. Its event parameters are `audience_name` and `zeotap_event_type`. This `audience_name` is the Audience Name and `zeotap_event_type` is the segment membership of the user.

* If a user is part of the segment, then add is sent.
* If the user is removed from the segment in subsequent refreshes, then remove is sent.

<Note>
  **Note:**

  Audience Name created by the clients must be 100 characters or fewer, or else it will not be ingested by GA4.
</Note>

## Create a Destination for Google Analytics 4

Perform the following steps to create a Destination for Google Analytics 4:

<Steps>
  <Step>
    Log into the Zeotap CDP App and go to the **DESTINATIONS** application.
  </Step>

  <Step>
    Click **+ Create Destination.**

    <Frame>
      <img src="https://mintcdn.com/zeotap/xGzkHY-dcQy5tLit/articles/integrate-customer/Storage/integrate-customer/ADOBE_DMP_3.png?fit=max&auto=format&n=xGzkHY-dcQy5tLit&q=85&s=102da1a60a97d389369069c7bad552ab" width="2870" height="796" data-path="articles/integrate-customer/Storage/integrate-customer/ADOBE_DMP_3.png" />
    </Frame>
  </Step>

  <Step>
    Under **All Destinations**, search for **Google Analytics 4**.

    <Frame>
      <img src="https://mintcdn.com/zeotap/xGzkHY-dcQy5tLit/articles/integrate-customer/Storage/integrate-customer/ADOBE_DMP_4.png?fit=max&auto=format&n=xGzkHY-dcQy5tLit&q=85&s=6a7ff3c41d25bca380ad1cdfe0d1f678" width="2866" height="888" data-path="articles/integrate-customer/Storage/integrate-customer/ADOBE_DMP_4.png" />
    </Frame>
  </Step>

  <Step>
    Click **Google Analytics 4.** A screen appears displaying details about the particular destination towards the left. On the right-hand side of the screen find a list of fields that are required for the integration to be established. Enter the required details as mentioned in the following steps:

    a. Enter a name for the Destination.

    b. Enter the **Measurement ID** and **API Secret** that you obtained as mentioned above.

    c. Review all the values entered above and then click **Next** to proceed.

    <Frame>
      <img src="https://mintcdn.com/zeotap/UNwlFBI6l-jpipWP/articles/integrate-customer/Storage/integrate-customer/google-ad-manager/Google_Analytics_4_1.png?fit=max&auto=format&n=UNwlFBI6l-jpipWP&q=85&s=c2de68425bafeae3bcfa97d8935ccc09" width="2392" height="1428" data-path="articles/integrate-customer/Storage/integrate-customer/google-ad-manager/Google_Analytics_4_1.png" />
    </Frame>
  </Step>

  <Step>
    In the new screen that appears, choose the appropriate Action and mapping as explained below.

    a. Choose the desired [action](/articles/integrate-customer/destinations#actionsanchor) under **Choose your Action** and then choose the corresponding identifiers under **Map the Fields**. By default, the [Output Identifiers](https://docs.zeotap.com/articles/segment-customer/choose-the-output-identifiers) that are accepted by the platform such as, MAIDs, Cookies, email Ids and more are displayed. However, you can edit, add or remove an identifier from the list. To do so, refer [here](/articles/integrate-customer/destinations#mappingsanchor).

    b. Click **Create Destination**. The created Destination gets listed in the **Audiences** application, which can be linked to an Audience/segment.

    <Frame>
      <img src="https://mintcdn.com/zeotap/FCzFgv-TEYPP6Zvb/articles/integrate-customer/Storage/integrate-customer/google_analytics_4_2.png?fit=max&auto=format&n=FCzFgv-TEYPP6Zvb&q=85&s=876d14b85e05e857769c8441764061a8" width="2456" height="1422" data-path="articles/integrate-customer/Storage/integrate-customer/google_analytics_4_2.png" />
    </Frame>
  </Step>
</Steps>

## Link an Audience to the Google Analytics 4 Destination

For information about how to link an Audience or segment to the created Destination in **Audiences** application, refer [here](/articles/integrate-customer/link-an-audience-to-the-destination). Note that it can take up to one business day for the segment to be available at the Google Analytics 4 seat.

<Note>
  **Note:**

  The terms *Audiences* and *Segments* are used interchangeably to refer to customer cohorts belonging to a specific category. For example, an Audience or a segment can be a specific group of customers who are over 18 years of age and have performed an `addToCart` event within the last 30 days.
</Note>

## Use case to Understand the Integration Better

Assume that as a client, you are sending userId (GA Client Ids) corresponding to a segment and using this ID to create an audience within GA4. This audience can then be linked to Google Ads to use in your Ad campaigns. In such a scenario, you are required to create an audience in GA4 as mentioned below.

<Steps>
  <Step>
    Navigate to **Configure > Audiences > New Audience > Create a Custom Audience.**
  </Step>

  <Step>
    Include users to your audience. Click **Add new condition** and then make the following selections:

    a. Click **Events** and then choose **zeotap\_event** from the drop-down menu.

    b. Click **ADD PARAMETER** and make the following selections under **Custom**:

    i. **Audience Name** > **audience\_name** > choose the relevant audience name. The audience name automatically appears in the drop-down menu for **audience\_name**.

    ii. **Zeotap Event Type** > **zeotap\_event\_type** > choose **Add** for users being added to the segment.

    c. If users were removed from the audience in subsequent refreshes, then click **ADD GROUP TO EXCLUDE.**
  </Step>

  <Step>
    To exclude users that were subsequently removed from the audience, Click **Add new condition** and then make the following selections:

    a. Click **Events** and then choose **zeotap\_event** from the drop-down menu.

    i. **Audience Name** > **audience\_name** > choose the relevant audience name. The audience name automatically appears in the drop-down menu for **audience\_name**.

    ii. **Zeotap Event Type** > **zeotap\_event\_type** > choose **Remove** for users being added to the segment.
  </Step>

  <Step>
    Click **Save**.
  </Step>
</Steps>

<Note>
  **Note:**

  For information about how to create Audience in Google Analytics 4, refer [here](https://support.google.com/analytics/answer/9267572?hl=en#zippy=%2Cin-this-article).
</Note>

Once you have successfully performed the above steps, ensure to link your GA4 account with the Google Ads account for the audiences to appear in Google Ads. For information about how to to link Google Ads account to Google Analytics, refer [here](https://support.google.com/analytics/answer/9379420#zippy=%2Cin-this-article).

<Frame>
  <img src="https://mintcdn.com/zeotap/vhXLMoMLYK9r9Ts7/articles/integrate-customer/Storage/integrate-customer/build_audience.png?fit=max&auto=format&n=vhXLMoMLYK9r9Ts7&q=85&s=b929568693b5136cdb2ec024a0f79f74" width="2442" height="1052" data-path="articles/integrate-customer/Storage/integrate-customer/build_audience.png" />
</Frame>

## User Disqualification from Audiences

This integration supports user disqualification from audiences. That is, a user can be disqualified from an audience (segment) for various reasons, such as not meeting audience criteria, consent requirements or other conditions set for a particular audience.

* When a user disqualifies from an audience, Zeotap CDP initiates a user deletion request in the next refresh cycle. These requests are sent to the audiences linked to the specific destination.
* The disqualified users are excluded from the audiences based on the configured refresh frequency for a particular audience.
* User disqualification is a programmatic process that works automatically. You do not need to specify anything to trigger the disqualification and exclusion of users from audiences.
