# Google Analytics 4 Cloud Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Actions Google Analytic 4**, **Actions Google Analytics 4**, **Google Analytics 4**, **Google Analytics 4 Cloud** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

> \[!NOTE]
>
> This page is about the Google Analytics 4 Cloud Destination. See below for information about other versions of the Google destination:
>
> * [Google Analytics 4 Web](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/)

[Google Analytics 4](https://support.google.com/analytics/answer/10089681) is Google's new Analytics property, which you can use for both websites and applications. Google Analytics 4 has machine learning at its core to help surface insights and give you a more complete understanding of your customers across devices and platforms.

When you have Segment installed, you can use your existing tracking implementation to fulfill your data collection needs with Google Analytics 4. Segment will send your data server-side to [Google's Measurement Protocol API](https://developers.google.com/analytics/devguides/collection/protocol/ga4).

> \[!WARNING]
>
> Google Analytics 4 doesn't officially support a pure server-to-server integration. However, Segment monitors the capabilities of the Measurement Protocol API and updates the cloud integration accordingly to achieve a reasonable level of reporting for mutual customers. For full functionality, please see the [Google Analytics 4 Web destination](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/).

> \[!NOTE]
>
> Google enforced consent on March 6, 2024 for European Economic Area (EEA) users. Learn more about [consent mode](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#consent-mode) and how to set it up.

## Benefits of Google Analytics 4 Cloud

The Google Analytics 4 Cloud destination provides the following benefits:

* **Fewer settings**. Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings.
* **Clearer mapping of data**. Actions-based destinations enable you to define the mapping between the data Segment receives from your source and the data Segment sends to Google Analytics 4.
* **Prebuilt mappings**. Mappings for recommended Google Analytics 4 events, like `Purchase`, are prebuilt with the prescribed parameters and available for customization.
* **Support for multi-product arrays**. Products nested within arrays, like the `products` array in the [Order Completed](/docs/segment/connections/spec/ecommerce/v2/#order-completed) event, can be sent to Google Analytics 4.

## Getting started

Before you connect Segment to Google Analytics 4, configure a Google Analytics 4 property in your Analytics account. For more information, see Google's article: [Set up Analytics for a website and/or app](https://support.google.com/analytics/answer/9304153).

To add the Google Analytics 4 Cloud destination:

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for "Google Analytics 4 Cloud" in the Destinations Catalog, and select the destination.
3. Click **Configure Google Analytics 4 Cloud** in the top-right corner of the screen.
4. Select the source that will send data to Google Analytics 4 and follow the steps to name your destination.
5. On the **Settings** tab, enter in the [Measurement ID](https://support.google.com/analytics/answer/9539598) for web streams or the [Firebase App ID](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference?client_type=firebase#payload_query_parameters) for mobile streams. Next, enter in the API Secret associated with your GA4 stream and click **Save**. To create a new API Secret, navigate in the Google Analytics UI to Admin > Data Streams > choose your stream > Measurement Protocol > Create.
6. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/segment/connections/destinations/actions/#customize-mappings).

## Destination Settings

| Field           | Description                                                                                                                                                                          | Required | Type     |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -------- |
| API Secret      | An API SECRET generated in the Google Analytics UI, navigate to: Admin > Data Streams > choose your stream > Measurement Protocol > Create                                           | Yes      | password |
| Firebase App ID | The Firebase App ID associated with the Firebase app. Found in the Firebase console under: Project Settings > General > Your Apps > App ID. \*\*Required for mobile app streams.\*\* | No       | string   |
| Measurement ID  | The Measurement ID associated with a stream. Found in the Google Analytics UI under: Admin > Data Streams > choose your stream > Measurement ID. \*\*Required for web streams.\*\*   | No       | string   |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Google Analytics 4 Cloud-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Add to Cart](#add-to-cart-2)
* [Purchase](#purchase-3)
* [Page View](#page-view-1)
* [Select Promotion](#select-promotion-1)
* [Begin Checkout](#begin-checkout-1)
* [View Item](#view-item-1)
* [Custom Event](#custom-event-3)
* [Select Item](#select-item-1)
* [View Item List](#view-item-list-1)
* [Refund](#refund-1)
* [Add Payment Info](#add-payment-info-1)
* [Add to Wishlist](#add-to-wishlist-2)
* [Sign Up](#sign-up-1)
* [View Promotion](#view-promotion-1)
* [View Cart](#view-cart-1)
* [Login](#login-1)
* [Remove from Cart](#remove-from-cart-1)
* [Search](#search-2)
* [Generate Lead](#generate-lead-1)

### Add to Cart

Send event when a user adds items to a cart

Add to Cart is a **Cloud** action. The default Trigger is `type = "track" and event = "Product Added"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Purchase

Send event when a user completes a purchase

Purchase is a **Cloud** action. The default Trigger is `type = "track" and event = "Order Completed"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Affiliation                      | Store or affiliation from which this transaction occurred (e.g. Google Store).                                                                                                                                                                                                                         | No       | STRING |
| Coupon                           | Coupon code used for a purchase.                                                                                                                                                                                                                                                                       | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | Yes      | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| Order Id                         | The unique identifier of a transaction.                                                                                                                                                                                                                                                                | Yes      | STRING |
| Shipping                         | Shipping cost associated with the transaction.                                                                                                                                                                                                                                                         | No       | NUMBER |
| Tax                              | Total tax associated with the transaction.                                                                                                                                                                                                                                                             | No       | NUMBER |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Page View

Send page view when a user views a page

Page View is a **Cloud** action. The default Trigger is `type = "page"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Page Location                    | The current page URL                                                                                                                                                                                                                                                                                   | No       | STRING |
| Page Referrer                    | Previous page URL                                                                                                                                                                                                                                                                                      | No       | STRING |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Page Title                       | The current page title                                                                                                                                                                                                                                                                                 | No       | STRING |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Select Promotion

Send event when a user selects a promotion

Select Promotion is a **Cloud** action. The default Trigger is `type = "track" and event = "Promotion Clicked"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Creative Name                    | The name of the promotional creative.                                                                                                                                                                                                                                                                  | No       | STRING |
| Creative Slot                    | The name of the promotional creative slot associated with the event.                                                                                                                                                                                                                                   | No       | STRING |
| Location ID                      | The ID of the location.                                                                                                                                                                                                                                                                                | No       | STRING |
| Promotion ID                     | The ID of the promotion associated with the event.                                                                                                                                                                                                                                                     | No       | STRING |
| Promotion Name                   | The name of the promotion associated with the event.                                                                                                                                                                                                                                                   | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | No       | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Begin Checkout

Send event when a user begins checkout

Begin Checkout is a **Cloud** action. The default Trigger is `type = "track" and event = "Checkout Started"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Coupon                           | Coupon code used for a purchase.                                                                                                                                                                                                                                                                       | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### View Item

Send event when a user views an item

View Item is a **Cloud** action. The default Trigger is `type = "track" and event =  "Product Viewed"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Custom Event

Send any custom event

Custom Event is a **Cloud** action. The default Trigger is `type = "track"`

| Field                            | Description                                                                                                                                                                                                                                                                                                                                                                                                              | Required | Type    |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                                                                                                                                                | No       | STRING  |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                                                                                                                                       | No       | STRING  |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                                                                                                                                   | No       | STRING  |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier.                                                                                                                   | No       | STRING  |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                                                                                                                                      | No       | STRING  |
| Event Name                       | The unique name of the custom event created in GA4. GA4 does not accept spaces in event names so Segment will replace any spaces with underscores. More information about GA4 event name rules is available in \[their docs]\(https://support.google.com/analytics/answer/10085872?hl=en\&ref\_topic=9756175#event-name-rules\&zippy=%2Cin-this-article.%2Cin-this-article).                                             | Yes      | STRING  |
| Lowercase Event Name             | If true, the event name will be converted to lowercase before sending to Google. Event names are case sensitive in GA4 so enable this setting to avoid distinct events for casing differences. More information about GA4 event name rules is available in \[their docs]\(https://support.google.com/analytics/answer/10085872?hl=en\&ref\_topic=9756175#event-name-rules\&zippy=%2Cin-this-article.%2Cin-this-article). | No       | BOOLEAN |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.                                                                                                                            | No       | OBJECT  |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                                                                                                                                            | No       | NUMBER  |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                                                                                                                                      | No       | OBJECT  |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                                                                                                                                                 | No       | STRING  |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |

### Select Item

Send event when a user selects an item from a list

Select Item is a **Cloud** action. The default Trigger is `type = "track" and event = "Product Clicked"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Item List Name                   | The name of the list in which the item was presented to the user.                                                                                                                                                                                                                                      | No       | STRING |
| Item List Id                     | The ID of the list in which the item was presented to the user.                                                                                                                                                                                                                                        | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### View Item List

Send event when a user views a list of items or offerings

View Item List is a **Cloud** action. The default Trigger is `type = "track" and event = "Product List Viewed"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Item List ID                     | The ID of the list in which the item was presented to the user.                                                                                                                                                                                                                                        | No       | STRING |
| Item List Name                   | The name of the list in which the item was presented to the user.                                                                                                                                                                                                                                      | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Refund

Send event when a refund is issued

Refund is a **Cloud** action. The default Trigger is `type = "track" and event = "Order Refunded"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Order Id                         | The unique identifier of a transaction.                                                                                                                                                                                                                                                                | Yes      | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| Affiliation                      | Store or affiliation from which this transaction occurred (e.g. Google Store).                                                                                                                                                                                                                         | No       | STRING |
| Coupon                           | Coupon code used for a purchase.                                                                                                                                                                                                                                                                       | No       | STRING |
| Shipping                         | Shipping cost associated with the transaction.                                                                                                                                                                                                                                                         | No       | NUMBER |
| Tax                              | Tax cost associated with a transaction.                                                                                                                                                                                                                                                                | No       | NUMBER |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | No       | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Add Payment Info

Send event when a user submits their payment information

Add Payment Info is a **Cloud** action. The default Trigger is `type = "track" and event = "Payment Info Entered"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| Coupon                           | Coupon code used for a purchase.                                                                                                                                                                                                                                                                       | No       | STRING |
| Payment Type                     | The chosen method of payment.                                                                                                                                                                                                                                                                          | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Add to Wishlist

Send event when a user adds items to a wishlist

Add to Wishlist is a **Cloud** action. The default Trigger is `type = "track" and event = "Product Added to Wishlist"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Sign Up

Send event when a user signs up to measure the popularity of each sign-up method

Sign Up is a **Cloud** action. The default Trigger is `type = "track" and event = "Signed Up"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Method                           | The method used for sign up.                                                                                                                                                                                                                                                                           | No       | STRING |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### View Promotion

Send event when a promotion is shown to a user

View Promotion is a **Cloud** action. The default Trigger is `type = "track" and event = "Promotion Viewed"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Creative Name                    | The name of the promotional creative.                                                                                                                                                                                                                                                                  | No       | STRING |
| Creative Slot                    | The name of the promotional creative slot associated with the event.                                                                                                                                                                                                                                   | No       | STRING |
| Location ID                      | The ID of the location.                                                                                                                                                                                                                                                                                | No       | STRING |
| Promotion ID                     | The ID of the promotion associated with the event.                                                                                                                                                                                                                                                     | No       | STRING |
| Promotion Name                   | The name of the promotion associated with the event.                                                                                                                                                                                                                                                   | No       | STRING |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### View Cart

Send event when a user views their cart

View Cart is a **Cloud** action. The default Trigger is `type = "track" and event = "Cart Viewed"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Login

Send event when a user logs in

Login is a **Cloud** action. The default Trigger is `type = "track" and event = "Signed In"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Method                           | The method used to login.                                                                                                                                                                                                                                                                              | No       | STRING |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Remove from Cart

Send event when a user removes items from a cart

Remove from Cart is a **Cloud** action. The default Trigger is `type = "track" and event = "Product Removed"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| Products                         | The list of products purchased.                                                                                                                                                                                                                                                                        | Yes      | OBJECT |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Search

Send event when a user searches your content

Search is a **Cloud** action. The default Trigger is `type = "track" and event = "Products Searched"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Search Term                      | The term that was searched for.                                                                                                                                                                                                                                                                        | Yes      | STRING |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

### Generate Lead

Send event when a user submits a form or request for information

Generate Lead is a **Cloud** action. The default Trigger is `type = "track"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type   |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Data Stream Type                 | The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android). Possible values: "Web" (default) and "Mobile App".                                                                                                                              | No       | STRING |
| Firebase App Instance ID         | Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. \*\*Required for mobile app streams.\*\*                                                                                                                                     | No       | STRING |
| Client ID                        | Uniquely identifies a user instance of a web client. \*\*Required for web streams.\*\*                                                                                                                                                                                                                 | No       | STRING |
| User ID                          | A unique identifier for a user. See Google's \[User-ID for cross-platform analysis]\(https://support.google.com/analytics/answer/9213390) and \[Reporting: deduplicate user counts]\(https://support.google.com/analytics/answer/9355949?hl=en) documentation for more information on this identifier. | No       | STRING |
| Event Timestamp                  | A Unix timestamp (in microseconds) for the time to associate with the event. Segment will convert to Unix if not already converted. Events can be backdated up to 3 calendar days based on the property's timezone.                                                                                    | No       | STRING |
| Currency                         | Currency of the items associated with the event, in 3-letter ISO 4217 format.                                                                                                                                                                                                                          | No       | STRING |
| Value                            | The monetary value of the event.                                                                                                                                                                                                                                                                       | No       | NUMBER |
| User Properties                  | The user properties to send to Google Analytics 4. You must create user-scoped dimensions to ensure custom properties are picked up by Google. See Google’s \[Custom user properties]\(https://support.google.com/analytics/answer/9269570) to learn how to set and register user properties.          | No       | OBJECT |
| Engagement Time in Milliseconds  | The amount of time a user interacted with your site, in milliseconds. Google only counts users who interact with your site for a non-zero amount of time. By default, Segment sets engagement time to 1 so users are counted.                                                                          | No       | NUMBER |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT |
| Ad User Data Consent State       | Sets consent for sending user data to Google for advertising purposes. Must be either GRANTED or DENIED.                                                                                                                                                                                               | No       | STRING |
| Ad Personalization Consent State | Sets consent for personalized advertising. Must be either GRANTED or DENIED.                                                                                                                                                                                                                           | No       | STRING |

## Consent mode

[Consent mode](https://support.google.com/analytics/answer/9976101?hl=en) is a feature provided by Google in the context of its products, particularly the Gtag library and Google Analytics. As of March 6, 2024, Google announced that consent mode must function for European Economic Area (EEA) users, otherwise data from EEA users won't process.

Consent mode in the Gtag library and Google Analytics is designed to help website owners comply with privacy regulations, such as the General Data Protection Regulation (GDPR) in the European Union. It allows website owners to adjust how these tools use and collect data based on user consent.

With consent mode, you can configure your website to dynamically adjust the tracking behavior of the Gtag library and Google Analytics based on the user's consent status. If a user provides consent to data processing, both the Gtag library and Google Analytics can collect and use that data for analysis. If a user doesn't provide consent, both tools limit data collection to essential functions, helping businesses respect user privacy preferences.

Consent mode may involve updates to your sources outside of Segment, such as incorporating a consent management system for consent functionality.

### Set up consent mode

To enable consent mode for your Google Analytics 4 Cloud destination, you must update the **Ad User Data Consent State** and **Ad Personalization Consent State** for all mappings you want to send with consent. Consent mode supports all actions with Google Analytics 4 Cloud. You can choose from 2 options to enable consent mode for your Google Analytics 4 Cloud destination.

* **Option 1**

  To enable consent mode for Google Analytics 4 Cloud destination:

  1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Cloud destination.
  2. Go to the **Mappings** tab of the destination.
  3. Select the mapping you want to edit.
  4. Under the **Select mappings** section, find **Ad User Data Consent State**.
  5. Select `GRANTED` in the dropdown that corresponds to **Ad User Data Consent State**.
  6. Select `GRANTED` in the dropdown that corresponds to **Ad Personalization Consent State**.
* **Option 2**

  Create an event variable to directly grab the value from the payload. To do this:

  1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Cloud destination.
  2. Go to the **Mappings** tab of the destination.
  3. Select the mapping you want to edit.
  4. Under the **Select mappings** section, find **Ad User Data Consent State**.
  5. Select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED` or `DENIED`. You can use an insert or [replace function](/docs/segment/connections/destinations/actions/#replace-function) to translate other values to `GRANTED`or `DENIED`.
  6. Repeat step 5 for **Ad Personalization Consent State**.

If you have any questions setting up consent mode, reach out to [friends@segment.com](mailto:friends@segment.com).

## Universal Analytics and Google Analytics 4

### Differences between Universal Analytics and Google Analytics 4

Google Analytics 4 uses an event-based data model similar to Segment, with the principle that any interaction can be captured as an event. Universal Analytics, on the other hand, is based on hits and is primarily pageview-based. Because the data collection models are different, data cannot be migrated from Universal Analytics to Google Analytics 4 and Google recommends recreating your existing Universal Analytics tracking in Google Analytics 4. For more information on the different data models, see Google's [Events in Google Analytics 4 vs Universal Analytics](https://support.google.com/analytics/answer/11091422?hl=en\&ref_topic=11091421) and [Universal Analytics versus Google Analytics 4 data](https://support.google.com/analytics/answer/9964640?hl=en\&ref_topic=11192706).

Google Analytics 4 has different out-of-the-box reports. Google Analytics 4's reporting is much more configurable and supports new reporting metrics like churn probability and predictive revenue estimates. In addition, goals defined in Universal Analytics have been replaced with the concept of conversions in Google Analytics 4. Reports and conversions will need to be rebuilt in Google Analytics 4.

> \[!NOTE]
>
> To determine whether you have a Universal Analytics property or a Google Analytics 4 property, look at your property ID. Universal Analytics property IDs start with UA and end with a number (UA-XXXXXXXXX-1). Google Analytics 4 property IDs have only numbers (XXXXXXXXX).

### Migrating from Universal Analytics to Google Analytics 4

> \[!WARNING]
>
> Google announced that all standard Universal Analytics properties will stop processing new data on July 1, 2023. 360 Universal Analytics properties with a current order will receive a one-time processing extension ending on July 1, 2024. Learn more about when [Google Analytics 4 will replace Universal Analytics](https://support.google.com/analytics/answer/11583528?sjid=13479291677968058253-NA).

Segment's Google Analytics 4 Cloud integration is a server-side integration with the GA4 Measurement Protocol API. This is similar to Segment's Google Universal Analytics cloud-mode integration in that all data is sent directly to Google's servers. Please note that this means client-side functionality, such as [Enhanced Measurement](https://support.google.com/analytics/answer/9216061), may not be available through Segment. In addition, as Google continues to develop the GA4 Measurement Protocol API ahead of general availability of the API, there may be limitations that impact what can be seen in the Google Analytics 4 reports.

#### Recommended events

Google Analytics 4 requires the use of [recommended events and properties](https://support.google.com/analytics/answer/9267735) to power certain built-in reports. Segment's Google Analytics 4 Cloud destination provides prebuilt mappings to automatically map your [Segment spec](/docs/segment/connections/spec/ecommerce/v2) events to the corresponding Google Analytics 4 events and properties. If your Segment events don't follow the Segment spec exactly, you can modify the mappings. For example, Segment maps "Order Completed" events to the Google Analytics 4 "Purchase" event by default. If your company uses "Products Purchase" to indicate a purchase, this can be mapped in the Purchase action's Event Trigger instead.

Segment recommends using the prebuilt mappings when possible, however the Segment spec doesn't have an equivalent event for every Google Analytics 4 recommended event. If there are other recommended events you would like to send, please use the [Custom Event action](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#custom-event). For example, to send a `spend_virtual_currency` event, create a mapping for Custom Event, set up your Event Trigger criteria, and input a literal string of "spend\_virtual\_currency" as the Event Name. You can use the Event Parameters object to add fields that are in the `spend_virtual_currency` event such as `value` and `virtual_currency_name`.

#### Custom events

In addition to recommended events, you can also send custom events using the [Custom Event action](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#custom-event). Custom events are events that you name. Custom events don't appear in most standard reports; you need to set up custom reports for meaningful analysis. To create custom events in the Google Analytics 4 web interface, see Google's [Modify and create events through the user interface](https://support.google.com/analytics/answer/10085872).

> \[!NOTE]
>
> Google Analytics 4 requires that all event names contain only alpha-numeric characters and underscores, must start with an alphabetic character, and support a maximum of 40 characters. Segment replaces spaces in Event Names with an underscore, so that these events are accepted by GA4. For example, Segment renames an event named `Home Profile` to `Home_Profile`. In some cases, GA4 may reject an event outright, due to unsupported characters. For example, an event named `Home | Profile` will be silently rejected due to the pipe character.

In all cases, event names in GA4 are case sensitive and require values in all properties. The Custom Event action includes a **Lowercase Event Name** option, to ensure consistency of all events sent to Google. For more information, see Google's articles [Google Analytics 4 event name rules](https://support.google.com/analytics/answer/10085872?hl=en\&ref_topic=9756175#event-name-rules) and [Event name limitations](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=firebase).

#### Custom dimensions and metrics

With Google Analytics 4, you must create custom dimensions and metrics within the Google Analytics 4 interface and link parameters to the corresponding dimension or metric. When you create the dimension or metric, you can either select a parameter from the list of already collected fields or enter the name of the parameter you plan to collect in the future. Custom dimensions can be either event-scoped or user-scoped, and custom metrics must be event-scoped.

To send parameters to Google Analytics 4, use the Event Parameters or User Properties object available on every action. Only pass flat key-value pairs in the Event Parameters and User Properties objects. Keep in mind that Google silently drops any events that include nested parameters.

To achieve parity with Universal Analytics, you should create the same custom dimensions that you defined in Universal Analytics. Additionally, in Google Analytics 4, you should recreate many of the values that you tracked as event dimensions in Universal Analytics, particularly event category and event label. For more information, see [Google Analytics 4 Custom dimensions and metrics](https://support.google.com/analytics/answer/10075209).

#### Tracking active users and sessions

##### Server-side Implementation using Google Analytics 4 Cloud Destination

The Google Analytics 4 reports only display active users who engage with your site for a non-zero amount of time. To ensure users are rendered in reports, Segment sets the `engagement_time_msec` parameter to 1 by default. If you track engagement time on your Segment events, you can use the Engagement Time in Milliseconds field mapping to set `engagement_time_msec` to a different value.

Besides Engagement Time in Milliseconds, you can also generate your own `session_id` and `session_number` and pass them as event properties to Segment. These properties can then be mapped to their corresponding parameters in Segment's Google Analytics 4 Cloud destination.

> \[!NOTE]
>
> Session tracking server-side only supports a subset of user dimensions. Certain reserved fields such as location, demographics, other [predefined user dimensions](https://support.google.com/analytics/answer/9268042?hl=en\&ref_topic=11151952) and device-specific information are not supported by Google's Measurement Protocol API.

##### Using Gtag.js and Google Analytics 4 Cloud Destination

If you choose to integrate with Google Analytics 4 client-side (either with Segment's Google Analytics 4 Web destination or outside of Segment) *and* also use Segment's Google Analytics 4 Cloud destination to send events through the API, you will have all the reserved parameters and sessions tracking information available in Google Analytics 4 reports.

When using Gtag, [Google generates a `session_id` and `session_number` when a session begins](https://support.google.com/analytics/answer/9191807?hl=en). The `session_id` and `session_number` generated on the client can be passed as Event Parameters to stitch events sent through the API with the same session that was collected client-side. Additionally, `client_id` must be the same for both client-side and server-side events in order to deduplicate user counts in GA4 (unless User-ID is used as the basis for user identification). For events to stitch properly, server-side events must arrive within a 48 hour window of when the client-side events arrive.

You can check your `client_id`, `session_id` and `session_number` with the [Google Site Tag function](https://developers.google.com/tag-platform/gtagjs/reference) or by running this script in your JavaScript console and replacing `G-xxxxxxxxxx` with your Google Analytics 4 Measurement ID:

```java
const sessionIdPromise =  new  Promise(resolve => {
	gtag('get', 'G-xxxxxxxxxx', 'session_id', resolve)
});
const sessionNumPromise =  new  Promise(resolve => {
	gtag('get', 'G-xxxxxxxxxx', 'session_number', resolve)
});

const clientIdPromise =  new  Promise(resolve => {
	gtag('get', 'G-xxxxxxxxxx', 'client_id', resolve)
});

Promise.all([sessionIdPromise, sessionNumPromise, clientIdPromise]).then(function(session_data) {
	console.log("session ID: "+session_data[0]);
	console.log("session Number: "+session_data[1]);
  console.log("client ID: "+session_data[2]);
});
```

#### User identification

Segment requires a Client ID or Firebase App Instance ID to send data to Google Analytics 4. The Client ID is the web equivalent of a device identifier and uniquely identifies a given user instance of a web client. By default, Segment sets Client ID to the Segment `userId`, falling back on `anonymousId`. This mapping can be changed within each action if you prefer to map a different field to Client ID.

The Firebase App Instance ID is the mobile equivalent of a device identifier and uniquely identifiers a given Firebase app instance. No default is set for Firebase App Instance ID, as [this value needs to be retrieved through the Firebase SDK](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference?client_type=firebase#payload_post_body).

Segment also allows you to send a User-ID with your events. The User-ID feature lets you associate your own identifiers with individual users so you can connect their behavior across different sessions and on various devices and platforms. For more information on User-ID, see Google's [Measure activity across platforms](https://support.google.com/analytics/answer/9213390).

There are certain scenarios where sending a User-ID can be helpful. For example, if you choose to integrate with Google Analytics 4 client-side (either with Segment's Google Analytics 4 Web destination or outside of Segment) *and* also use Segment's Google Analytics 4 Cloud destination to send events through the API, you may consider taking the following approach:

* **Use the Gtag-generated Client ID.** Gtag will set a Client ID automatically. The Client ID is stored in a cookie and can be fetched on the web client. To tie data between client-side and server-side, pass the Gtag-generated Client ID to Segment as a property and use that value as the Client ID in the Google Analytics 4 Cloud destination mappings.
* **Use the Segment `userId` for User-ID.** The Segment `userId` should be your company's canonical user identifier. By setting Google's User-ID to the same value as `userId` on client-side and server-side, you can benefit from cross-platform analytics. In addition, if you use [Firebase to send mobile data to Google Analytics 4](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#mobile-data), using the same User-ID across web and mobile will ensure users are stitched together across devices.

#### Validating and comparing data

Google recommends a period of dual-collection with both Universal Analytics and Google Analytics 4. This dual-collection approach lets you build a historical record in Google Analytics 4 while continuing to depend on Universal Analytics until you're ready to fully switch over.

During this period, you may find it hard to perfectly compare between the two properties because reports and configuration settings vary between Universal Analytics and Google Analytics 4 properties. Google provides guidance on the [conditions that must be met](https://support.google.com/analytics/answer/9964640?hl=en\&ref_topic=11192706#comparing) in order to compare data in the Realtime reports, as well as [which metrics are comparable versus not](https://support.google.com/analytics/answer/11986666?hl=en\&ref_topic=10737980).

For a complete map of Universal Analytics functionality to corresponding Google Analytics 4 functionality, please see Google's [Migration Reference](https://support.google.com/analytics/answer/10607999?hl=en\&ref_topic=10737980).

## FAQ and Troubleshooting

### Data not sending to Google

Ensure that at least one mapping has been configured and enabled in the destination mappings for an event that you would like to reach Google. Without any mappings enabled to trigger on an event that has been ingested by the connected source, the destination will not send events downstream.

### Attribution reporting

Google doesn't currently support passing certain reserved fields to the Google Analytics 4 Measurement Protocol API. This includes attribution data, like UTM parameters. If you rely on attribution reporting, you can either send this data as [custom dimensions](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#custom-dimensions-and-metrics) or implement a parallel client-side integration to collect this data with gtag.js (web) or Firebase (mobile).

### Debug mode

The Google Analytics 4 [debug mode](https://support.google.com/analytics/answer/7201382?hl=en) only works with a client-side implementation through gtag.js, Google Tag Manager, or Firebase. Because Segment's Google Analytics 4 Cloud integration is server-side and uses the Measurement Protocol API, debug mode is not supported.

However, you can use Google's `/debug` endpoint to test your events against Google's Measurement Protocol Validation Server. For more information, see Google's [Validate events](https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events?client_type=gtag#:~:text=Protocol%20Validation%20Server-,/debug/mp/collect,-All%20other%20request) documentation.

To validate your events:

1. Run a test through Segment's [Event Tester](/docs/segment/connections/test-connections/) with the event you're concerned about.
2. Copy the `Request from Segment` value you see. This is the payload that Segment attempts to send to Google.
3. Use an API testing tool, like Postman, to send that payload to Google's `/debug` endpoint.
4. Google's `/debug` endpoint returns a [validation code](https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events?client_type=gtag#validation_code) and a description of the error.

### Mobile data

To achieve complete reporting, Google recommends use of their Firebase SDKs to send mobile data to Google Analytics 4. To assist in your implementation, Segment has a [Firebase destination](/docs/segment/connections/destinations/catalog/firebase) available for mobile analytics. For more information on linking Google Analytics 4 properties to Firebase, see [Google Analytics 4 Firebase integration](https://support.google.com/analytics/answer/9289234?hl=en).

The Segment Google Analytics 4 Cloud destination supports sending mobile app events server-side to supplement your Firebase implementation. To send mobile events server-side, configure the Firebase App ID in the Destination settings. In each mapping, change the Data Stream Type to `Mobile App` and set a Firebase App Instance ID so that data routes to a mobile stream.

### Reserved names

Google reserves certain event names, parameters, and user properties. Google silently drops any events that include [these reserved names](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference?client_type=gtag#reserved_names). Google doesn't accept events in the following conditions:

* event or user property names have spaces in them
* fields with `null` values
* fields or events with reserved names
* fields with a number as the key
* fields or events with a dash (-) character in the name
* property names with capital letters

### Verifying Event Meet GA4's Measurement Protocol API

**Why are the events returning an error *Param \[PARAM] has unsupported value.*?**
Google has some requirements/[limitations](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=gtag#limitations) imposed by their [Measurement Protocol API](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=gtag). If an event contains `null`/`object`/`array` parameters, GA4 silently drops the event, so Segment does not attempt to send the event but instead returns an error of `Invalid Type` that can be found in the destination's Event Delivery tab. To verify whether an event will return this error, you can send an event to [GA4's debug endpoint](https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events?client_type=gtag) with an API tool like [Postman](https://www.postman.com/).

### Data takes a long time to appear in Google's reports

Google may take [24-48 hours](https://support.google.com/analytics/answer/9333790) to process data sent to Google Analytics. As a result, the Google Analytics user interface may not reflect the most current data. The Google Analytics [Realtime report](https://support.google.com/analytics/answer/9271392) displays activity on your site as it happens.

### Events with timestamps older than 72 hours are not showing on Google's end

Because [Google's Measurement Protocol API](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference?client_type=gtag#payload_post_body) only accepts events that are backdated by up to 72 hours, GA4 can't accept events older than 72 hours.

### Google Optimize Support

The Google Analytics 4 Cloud destination does not support Google Optimize. This destination operates in cloud-mode (sending events from Segment servers to Google Analytics using the Measurement Protocol API), which prevents the required [Optimize SDK](https://support.google.com/optimize/answer/11287798?visit_id=637903946258690719-978290187\&rd=1) snippet from loading on the page.

### Client/server-side event deduplication

Google doesn't offer guidance around how to deduplicate the same event coming in server and client side. As a result, Segment recommends that you don't send the same event into Google Analytics 4 from two different locations such that you would expect Google to deduplicate one of the events out of their pipeline. You can deduplicate user counts using the `User ID` field, but you cannot deduplicate whole events in the Google platform as far as Segment is aware.

### User-provided data collection

Google offers a beta feature called [User-provided data collection](https://support.google.com/analytics/answer/14077171?hl=en\&utm_id=ad) that collects data directly from users. Segment doesn't support this feature. Acknowledging the feature policy in your Google Analytics 4 account is permanent, even though you can later disable the data collection itself.
