# Google Analytics 4 Web 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 **Google Analytics 4 Web** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This destination is not compatible with [Destination Insert Functions.](/docs/segment/connections/functions/insert-functions/)

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

[Google Analytics 4](https://support.google.com/analytics/answer/10089681) is Google's Analytics property that 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 Analytics 2.0 tracking implementation to fulfill your data collection needs with Google Analytics 4. When you enable the Google Analytics 4 Web destination, Segment loads the [gtag.js library](https://support.google.com/analytics/answer/9310895?hl=en#zippy=%2Cin-this-article) for you. To avoid duplicate data, remove the native gtag.js script from your page.

> \[!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-web/#consent-mode) and how to set it up.

## Getting started

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

To connect the Google Analytics 4 Web destination:

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for "Google Analytics 4 Web" in the Destinations Catalog, and select the destination.
3. Click **Configure Google Analytics 4 Web**.
4. Select the web source that will send data to Google Analytics 4 and follow the steps to name your destination. The web source chosen must use [Analytics.js 2.0](/docs/segment/connections/sources/catalog/libraries/website/javascript/). For mobile source tracking, view the [Firebase Destination](/docs/segment/connections/destinations/catalog/firebase/).
5. On the **Settings** tab, under **Basic Settings**, enter in the [Measurement ID](https://support.google.com/analytics/answer/9539598) associated with your GA4 web stream.
6. Set up your event mappings by following the steps in the Destinations Actions documentation on [Customizing mappings](/docs/segment/connections/destinations/actions/#customize-mappings).
7. Analytics.js requires an initial Page call to send data to Google Analytics 4 Web. The [Segment snippet](/docs/segment/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-add-the-segment-snippet) includes this initial call by default.
8. For GA4 to accept events on page, enable Set Configuration Mapping triggered by the first Segment event called after analytics.load(). Set Configuration Mapping calls the gtag('config') command to enable tracking to your GA4 Measurement ID.

After you've set up and enabled the Set Configuration Mapping, enable at least one event in your **Mappings** tab. From there, view your events and parameters using the Google [Realtime](https://support.google.com/analytics/answer/9271392) or [DebugView](https://support.google.com/analytics/answer/7201382) reports. These two reports show you the events users trigger on your website as they occur. The DebugView report requires additional configuration before you can use it. Additional tools for debugging are to view all your Google enabled tracking via [Tag Assistant](https://tagassistant.google.com) or in your browser's Dev Tools, view GA4 collect requests by filtering by /collect.

Google Analytics automatically populates some events and parameters. For example, there are [Automatically Collected](https://support.google.com/analytics/answer/9234069) events collected by triggering the Set Configuration Mapping. Calling gtag('config') and enabling [Enhanced Measurement events](https://support.google.com/analytics/answer/9216061), which are controlled by toggling "on" in your GA4 Admin panel, use event listeners to send events. All events tracked via GA4 Web populate some commonly used parameters like `page_location` without additional configuration. Review the [Google Analytics event parameters](https://support.google.com/analytics/table/13594742) documentation for more information.

### Recommended events

Google recommends that you use their [Recommended events](https://support.google.com/analytics/answer/9267735) and properties to power certain built-in reports in Google Analytics 4. Segment's Google Analytics 4 Web destination provides prebuilt mappings to automatically map your Segment spec 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 an `Order Completed` event to the Google Analytics 4 `Purchase` event, but if your company uses `Products Purchase` to indicate a purchase, you can map it 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'd like to send, use the [Custom Event action](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/#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`. Remember to define custom parameters as [custom dimensions and metrics](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/#custom-dimensions-and-metrics) within the GA4 Admin panel first.

### Custom events and event naming

Before you create a custom event, make sure the event you want to create isn't already collected through an [Automatically Collected event](https://support.google.com/analytics/answer/9234069?sjid=7831609405656395105-NA) or recommended as a [Recommended event](https://support.google.com/analytics/answer/9267735?sjid=7831609405656395105-NA).
Google Analytics 4 does not accept custom event names that include spaces. Segment replaces spaces in the Event Name in the Custom Event action with an underscore. As a result, you see custom events as snake\_case in Google Analytics 4.

Event names are case-sensitive in Google Analytics 4. If you would like all event names to be lowercase, use the **Lowercase Event Name** setting when you create a Custom Event mapping and select `Yes` from the dropdown. If this setting is disabled, Google treats event names with different casing as distinct events.

Custom Events don't appear in some of Google's standard reports; you must set up custom reports for meaningful analysis.

> \[!NOTE]
>
> To pass item parameters, you must use Google Recommended Event names that accept the items array, in other words, Ecommerce Events. Item parameters do not pass to GA4 with a Custom Event name or any other Event name if the items array is not specified as a parameter.

### Custom dimensions and metrics

With Google Analytics 4, you must create custom dimensions and metrics, also known as Custom Definitions, within the Google Analytics 4 Admin interface to link event parameters to the corresponding custom dimensions or metrics. When creating 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. For more information, see [Google Analytics 4 Custom dimensions and metrics](https://support.google.com/analytics/answer/10075209?hl=en).

### Understanding event parameters

Similar to how properties relate to Segment events, parameters provide additional information about the ways users interact with your website. For example, when someone views a product you sell, you can include parameters that describe the product they viewed, like `product_name`, `category`, and `price`.

Automatically Collected and Enhanced Measurement events include a defined set of parameters by default. Google also provides a set of required and optional parameters to include with each Recommended event, and you can add more event parameters when you need them. Segment recommends that you review GA4's list of defined event parameters, as anything beyond that list is a custom event parameter. The [Event collection limits](https://support.google.com/analytics/answer/9267744) also impact how many Custom Definitions your GA4 instance allows and how many parameters you can send with each event.

### Conversion events

Some of Segment's prebuilt [Available Actions](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/#available-actions) that map to Google's recommended events are automatically marked as a conversion in your Analytics dashboard. For example, when you add an "Order Completed" event, it will show up in your Analytics dashboard as "purchase" with the **Mark as conversion** toggle toggled on by default. However, for other events, such as "Add to Cart", you must manually toggle the **Mark as conversion** setting on in your Analytics dashboard. If you don't mark the event as a conversion, it will not show up as a conversion in your built-in reports. You can read more [about conversion events](https://support.google.com/analytics/answer/9267568?sjid=1275909514202748631-NA) in Google's documentation.

## 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.

See [set up consent mode on websites](https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#update_consent_state) for more information.

### Set up consent mode

To enable consent mode for your Google Analytics 4 Web destination:

1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Web\*\* destination.
2. Go to the **Settings** tab of the destination.
3. Click the toggle on for **Enable Consent Mode**, this calls gtag('consent','default') with the defined parameters when the gtag library loads.
4. Set the following fields with your organization's determination of granted or denied:

   | Field                                   | Value             |
   | --------------------------------------- | ----------------- |
   | Default Ad Storage Consent State        | Granted or Denied |
   | Default Analytics Storage Consent State | Granted or Denied |
   | Ad User Data Consent State              | Granted or Denied |
   | Ad Personalization Consent State        | Granted or Denied |
5. Use your consent management platform to prompt the visitor. Ask the visitor to grant or deny consent for the applicable types.
6. Pass the updated state as properties in the `page()` event after the next page load if you decide to change the consent defaults. For example,

   ```text
   analytics.page('Consent Update', {
       'Ads Storage Consent State': 'false',
       'Analytics Storage Consent State': 'false'
   });
   ```
7. As soon as the page loads and the set configuration fires to the Google Analytics SDK, Segment issues a consent mode update command. Map the properties you defined to collect consent state changes to the Set Configurations Fields mapping. You can choose to do this from 1 of 2 options in steps 4 and 5.
   1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Web destination.
   2. Go to the **mappings** tab of the destination.
   3. Select the mapping you want to edit.
   4. *(Option 1)* Under the **Select mappings** section, select `Granted` for these fields:
      * Ads Storage Consent State
      * Analytics Storage Consent State
      * Ad User Data Consent State
      * Ad Personalization Consent State
        You can manually select `Granted` or `Denied` from the dropdown menu for Advanced consent mode settings, and type in `granted` or `denied` for basic consent mode settings.
   5. *(Option 2)* Under the **Select mappings** section, create an event variable to directly grab the value from the payload (for example, `properties.adStorageConsentState`). 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`. Do this for these fields:
      * Ads Storage Consent State
      * Analytics Storage Consent State
      * Ad User Data Consent State
      * Ad Personalization Consent State

When these properties are available, they send to the `update` command.

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

## Destination Settings

| Field                                   | Description                                                                                                                                                                                                                                                                                                                                                             | Required | Type    |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Ad Personalization Consent State        | Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.                                                                                                                                                                                                                    | No       | select  |
| Ad User Data Consent State              | Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.                                                                                                                                                                                                                    | No       | select  |
| Allow Ad Personalization Signals        | Set to false to disable all advertising features. Set to true by default.                                                                                                                                                                                                                                                                                               | No       | boolean |
| Allow Google Signals                    | Set to false to disable all advertising features. Set to true by default.                                                                                                                                                                                                                                                                                               | No       | boolean |
| Cookie Domain                           | Specifies the domain used to store the analytics cookie. Set to “auto” by default.                                                                                                                                                                                                                                                                                      | No       | string  |
| Cookie Expiration In Seconds            | Every time a hit is sent to GA4, the analytics cookie expiration time is updated to be the current time plus the value of this field. The default value is two years (63072000 seconds). Please input the expiration value in seconds. More information in \[Google Documentation]\(https://developers.google.com/analytics/devguides/collection/ga4/reference/config#) | No       | number  |
| Cookie Flag                             | Appends additional flags to the analytics cookie.  See \[write a new cookie]\(https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write\_a\_new\_cookie) for some examples of flags to set.                                                                                                                                                                | No       | array   |
| Cookie Path                             | Specifies the subpath used to store the analytics cookie. We recommend to add a forward slash, / , in the first field as it is the Default Value for GA4.                                                                                                                                                                                                               | No       | string  |
| Cookie Prefix                           | Specifies a prefix to prepend to the analytics cookie name.                                                                                                                                                                                                                                                                                                             | No       | array   |
| Cookie Update                           | Set to false to not update  cookies on each page load. This has the effect of cookie expiration being relative to the first time a user visited. Set to true by default so update cookies on each page load.                                                                                                                                                            | No       | boolean |
| Default Ads Storage Consent State       | The default value for ad cookies consent state. This is only used if Enable Consent Mode is on. Set to  “granted” if it is not explicitly set. Consent state can be updated for each user in the Set Configuration Fields action.                                                                                                                                       | No       | select  |
| Default Analytics Storage Consent State | The default value for analytics cookies consent state. This is only used if Enable Consent Mode is on. Set to  “granted” if it is not explicitly set. Consent state can be updated for each user in the Set Configuration Fields action.                                                                                                                                | No       | select  |
| Domain                                  | A custom domain to load the Google Analytics script from. For more information see \[Google's Documentation]\(https://developers.google.com/tag-platform/tag-manager/server-side/dependency-serving?tag=gtag\&option=cdn).                                                                                                                                              | No       | string  |
| Enable Consent Mode                     | Set to true to enable Google’s \[Consent Mode]\(https://support.google.com/analytics/answer/9976101?hl=en). Set to false by default.                                                                                                                                                                                                                                    | No       | boolean |
| Measurement ID                          | The measurement ID associated with the web stream. Found in the Google Analytics UI under: Admin > Data Streams > Web > Measurement ID.                                                                                                                                                                                                                                 | Yes      | string  |
| Page Views                              | Set to false to prevent the default snippet from sending page views. Enabled by default.                                                                                                                                                                                                                                                                                | No       | boolean |
| Wait Time to Update Consent State       | If your CMP loads asynchronously, it might not always run before the Google tag. To handle such situations, specify a millisecond value to control how long to wait before the consent state update is sent. Please input the wait\_for\_update in milliseconds.                                                                                                        | No       | number  |

## Available Presets

Google Analytics 4 Web has the following presets

| Preset Name              | Trigger             | Default Action           |
| ------------------------ | ------------------- | ------------------------ |
| Set Configuration Fields | Event type = "page" | Set Configuration Fields |

## 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 Web-supported actions:

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

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

### Add to Cart

This event signifies that an item was added to a cart for purchase.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Search

The term that was searched for.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Search Term      | The term that was searched for.                                                                                                                                                                                                                                                                        | No       | STRING  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Select Item

This event signifies an item was selected from a list.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### View Item List

Log this event when the user has been presented with a list of items of a certain category.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Sign Up

The method used for sign up.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Custom Event

Send any custom event

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

| Field                | Description                                                                                                                                                                                                                                                                                                                                                                                                              | Required | Type    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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 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  |
| 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  |
| Event Parameters     | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                                                                                                                                      | No       | OBJECT  |
| Send To              | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                                                                                                                                                | No       | BOOLEAN |

### Refund

This event signifies when one or more items is refunded to a user.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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              | Total tax associated with the 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Add Payment Info

Send event when a user submits their payment information

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### View Cart

This event signifies that a user viewed their cart.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Set Configuration Fields

Set custom values for the GA4 configuration fields.

Set Configuration Fields is a **Web** action. The default Trigger is `type = "page"`

| Field                            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Ads Storage Consent State        | Consent state indicated by the user for ad cookies. Value must be “granted” or “denied.” This is only used if the Enable Consent Mode setting is on.                                                                                                                                                   | No       | STRING  |
| Analytics Storage Consent State  | Consent state indicated by the user for ad cookies. Value must be “granted” or “denied.” This is only used if the Enable Consent Mode setting is on.                                                                                                                                                   | No       | STRING  |
| Ad User Data Consent State       | Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.                                                                                                                                                   | No       | STRING  |
| Ad Personalization Consent State | Consent state indicated by the user for ad cookies. Value must be "granted" or "denied." This is only used if the Enable Consent Mode setting is on.                                                                                                                                                   | No       | STRING  |
| Campaign Content                 | Use campaign content to differentiate ads or links that point to the same URL. Setting this value will override the utm\_content query parameter.                                                                                                                                                      | No       | STRING  |
| Campaign ID                      | Use campaign ID to identify a specific campaign. Setting this value will override the utm\_id query parameter.                                                                                                                                                                                         | No       | STRING  |
| Campaign Medium                  | Use campaign medium to identify a medium such as email or cost-per-click. Setting this value will override the utm\_medium query parameter.                                                                                                                                                            | No       | STRING  |
| Campaign Name                    | Use campaign name to identify a specific product promotion or strategic campaign. Setting this value will override the utm\_name query parameter.                                                                                                                                                      | No       | STRING  |
| Campaign Source                  | Use campaign source to identify a search engine, newsletter name, or other source. Setting this value will override the utm\_source query parameter.                                                                                                                                                   | No       | STRING  |
| Campaign Term                    | Use campaign term to note the keywords for this ad. Setting this value will override the utm\_term query parameter.                                                                                                                                                                                    | No       | STRING  |
| Content Group                    | Categorize pages and screens into custom buckets so you can see metrics for related groups of information. More information in \[Google documentation]\(https://support.google.com/analytics/answer/11523339).                                                                                         | No       | STRING  |
| Language                         | The language preference of the user. If not set, defaults to the user's navigator.language value.                                                                                                                                                                                                      | No       | STRING  |
| Page Location                    | The full URL of the page. If not set, defaults to the user's document.location value.                                                                                                                                                                                                                  | No       | STRING  |
| Page Referrer                    | The referral source that brought traffic to a page. This value is also used to compute the traffic source. The format of this value is a URL. If not set, defaults to the user's document.referrer value.                                                                                              | No       | STRING  |
| Page Title                       | The title of the page or document. If not set, defaults to the user's document.title value.                                                                                                                                                                                                            | No       | STRING  |
| Screen Resolution                | The resolution of the screen. Format should be two positive integers separated by an x (i.e. 800x600). If not set, calculated from the user's window.screen value.                                                                                                                                     | No       | STRING  |
| Send Page Views                  | Selection overrides toggled value set within Settings                                                                                                                                                                                                                                                  | No       | BOOLEAN |
| Event Parameters                 | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |

### Purchase

This event signifies when one or more items is purchased by a user.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### View Promotion

This event signifies a promotion was viewed from a list.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Add to Wishlist

The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Remove from Cart

This event signifies that an item was removed from a cart.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Generate Lead

Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Select Promotion

This event signifies a promotion was selected from a list.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### View Item

This event signifies that some content was shown to the user. Use this event to discover the most popular items viewed.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Begin Checkout

This event signifies that a user has begun a checkout.

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | 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  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

### Login

Send event when a user logs in

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

| Field            | Description                                                                                                                                                                                                                                                                                            | Required | Type    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| 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  |
| 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  |
| Event Parameters | The event parameters to send to Google Analytics 4.                                                                                                                                                                                                                                                    | No       | OBJECT  |
| Send To          | If the send\_to parameter is not set, events are routed to all Tag Ids (AW-xxx, G-xxx) set via Google Tag                                                                                                                                                                                              | No       | BOOLEAN |

## FAQ and troubleshooting

### Debug mode

The Google Analytics 4 debug mode, [DebugView](https://support.google.com/analytics/answer/7201382?hl=en) is supported with the Google Analytics 4 Web destination. DebugView displays the events and user properties that Analytics collects from a user in real-time. This can be helpful when troubleshooting your implementation.

### Send events from both the browser and the server

With Google Analytics 4 Web, events are sent from the browser to GA4. If you use Segment's [Google Analytics 4 Cloud destination](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#benefits-of-google-analytics-4-cloud) to send events through the API and tie data between client-side and server-side, you need to pass the same Client ID from the browser and the server. To do this, fetch the Gtag-generated **clientId** on the web client and pass it to Segment as a property. For more information, see [Google Analytics 4 destination: User Identification](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#user-identification) on the next steps. Additionally, when using Gtag, Google generates a session\_id and session\_number when a session begins. 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, see [Using Gtagjs and Google Analytics 4 Cloud Destination](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/#using-gtagjs-and-google-analytics-4-cloud-destination) for more information and an example.

The client\_id and the session\_id are both cookies stored in the user browser. You can use [Google gtag get commands](https://developers.google.com/tag-platform/gtagjs/reference#get) or other cookie methods to parse these values from the \_ga cookie and \_ga\_measurementId cookie:

* If your \_ga cookie is GA1.1.1783165678.1701112990 then 1783165678.1701112990 is your client\_id
* If your \_ga\_M12454XDR cookie is GS1.1.1710342977.347.1.1710343074.0.0.0 then 1710342977 is your session\_id

You are not required to send a session number for server-side hits. Session metrics come from the client-side data after GA4 stitches server-side event data to the client-side session.

> \[!TIP]
>
> Segment recommends that you enable the GA4 Web destination first then incorporate GA4 Cloud destination to augment your client-side tracking, as a hybrid GA4 application is an advanced implementation. Segment also recommends that you have deep knowledge of GA4 session-stitching, troubleshooting, and known caveats of the GA4 Measurement Protocol prior to implementing the Google Analytics 4 destination.

### Additional (unmapped) events are sent to GA4

Google Analytics 4 collects events triggered by basic interactions with your site. For more information about which interactions are automatically collected, see [Google Analytics 4 Automatically Collected events](https://support.google.com/analytics/answer/9234069?hl=en).

### 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; however, events seen in Realtime reports do not always equate to how the data is processed in the standard reports. This disconnect between events seen in Realtime reports and Standard reports happens when a Custom Definition is not defined in the GA4 Admin panel.

### Data is not sent to Google

For event data to be sent downstream to Google Analytics:

1. Configure and enable the  **Set Configuration Fields** mapping. This mapping is required for data to be sent downstream because it sets configuration to the GA4 Measurement ID indicated in the Settings and establishes data flow using the `config` command.
2. Confirm you call `analytics.page()` on page load. Analytics.js requires an initial Page call to send data to Google Analytics 4 Web. *The Segment snippet includes this initial call by default.*
3. Send data with an event: typically this is a `page_view` as your first event.

Google has introduced a feature for collecting [user-provided data](https://support.google.com/analytics/answer/14077171?hl=en\&utm_id=ad), which Segment doesn't support. If you've enabled this feature in your Google Analytics 4 account, it is irreversible and may cause issues with receiving data. If everything else is set up correctly but data is still not appearing, check if this feature is enabled. If it is, you'll need to create a new GA4 space to resolve the issue.

> \[!NOTE]
>
> On", the page\_view event automatically sends when the Set Configuration Mapping is triggered"
> If you need to override this setting for your particular use case, see [Can I override my send\_page\_view selection that I declared in Settings?](#can-i-override-my-send_page_view-selection-that-i-declared-in-settings)

If no events are flowing to your GA4 instance, use one of the Debugging Tools to check the sequence of GA4 events.

### Duplicate `page_view` events in GA4

If you are sending multiple `gtag('config')` commands called from Set Configuration mapping on one page before a new DOM has loaded, and you have defined `send_page_view: true` with each 'Config' event, you may see duplicate `page_view` events sent to your GA4 measurement id. If this is the case, see Google's documentation on [Ignoring duplicate instances of on-page configuration](https://support.google.com/analytics/answer/9973999?hl=en#:~:text=as%20described%20below.-,Ignore%20duplicate%20instances%20of%20on%2Dpage%20configuration,Click%20Save.,-Give%20feedback%20about).

If your site is a Single Page Application (SPA), you may want to leave the **Ignore duplicate instances of on-page configuration** toggle disabled in the Google Tag Admin as a new DOM is not called on each new page path. If you have a SPA, disabled the **Ignore duplicate instances of on-page configuration** toggle, and have multiple Set Configuration mappings, use Segment's new **Send Page Views** field mapping to override the `send_page_view` parameter in your Settings. This selection takes precedence over what is defined in the Segment Settings. If you leave the selection for your destination undefined, it will fall back to what you selected in the Segment Settings.

If you enabled Enhanced Measurement, you might see additional `page_view` events. This happens when you enable the **Page changes based on browser history events** feature in the Advanced settings section of the **pageviews** settings. To avoid double counting page views on history state changes, disable the **Page changes based on browser history events** feature. See Google's [Manual pageviews](https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag#manual_pageviews) documentation for more information.

### Manually send `page_view` events

If you prefer to keep the **Page Views** setting disabled and manually send `page_view` events, see Google's documentation, [Manually send `page_view` events](https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag#manually_send_page_view_events).

With Google Analytics 4 Web, you must configure a [Custom Event](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/#custom-event) mapping to manually send `page_view` events. When mapping the events, set the Event Name to `page_view`.

You can now override the send\_page\_view value defined in the Segment Settings for the GA4 destination. To override the `send_page_view` value, navigate to your Set Configuration Mapping, click "Show More Fields" to expose the field mapping, and select either True or False. This selection takes precedence over what is defined in the Segment Settings. If you leave this selection undefined, Segment uses the selection you made in the Segment Settings.

#### Tracking UTM Parameters

Segment automatically tracks UTM parameters when they are present in the URL and sends them to Google. For example, with the following URL, Segment would send `email_variation1&utm_medium=email&utm_source=email_promo&utm_campaign=summer_sale&utm_id=abcd` to Google:
`https://www.example.com/?utm_content=email_variation1&utm_medium=email&utm_source=email_promo&utm_campaign=summer_sale&utm_id=abcd`

By default, if the UTM values are found in the `page_location` parameter, GA4 automatically maps the campaign parameters to their appropriate value. There is no additional configuration required, unless you want to override what GA4 defines. This is true for both Event mappings and the Set Configuration mapping. If you modify the output of the `page_location` and the UTM parameters are not included, this might result in erroneous acquisition and attribution mapping.

To observe this feature, trigger a `Page` call with UTM parameters present in the URL and navigate to the **Realtime overview** report in GA4 to see the resulting `page_view` event under the *Event count by Event name* card. The Acquisition card in the Realtime overview report reflects First User acquisition, but may not reflect the parameters of the event if this was a second session event.

### Pass Custom Event parameters to all events and Custom Item parameters to all recommended Ecommerce events

To pass custom event parameters to all events on the page, navigate to your Set Configuration Mapping, click **Show All Fields**, and enter any custom Event Parameters, including page\_view. Any event parameters that have the same parameter key as your other event mappings will take precedence over what is set in the Set Configuration Mapping.

To send custom item parameters, add the custom item parameter name in mappings where there is a Products array. Register your custom item parameter in the GA4 Admin panel if you would like this value processed in the GA4 UI. You can ONLY add custom item parameters in the Products array. If you add custom item parameters as an Event Parameter, they will be registered as an Event Parameter.

### My Events Send to the wrong Google ID

In each Event Mapping, there is a "Send To" parameter. Set this to "True" if you would like to include the send\_to parameter and only send the event to the measurement\_id configured in your settings. If you select "False" or do not enter a selection, GA4 Events will broadcast to all measurement IDs, including Google Ads IDs, on the page. These measurement IDs may be set outside of Segment. For more info on how the send\_to parameter works, see Google's documentation on [Group and Route Data](https://developers.google.com/tag-platform/gtagjs/routing).

### Can I override my send\_page\_view selection that I declared in the Settings?

Yes. In the Set Configuration Mapping, click Show All Fields and scroll to Send Page Views. Your selection overrides what is set within the Settings. This is helpful if you are updating the user\_id or user\_properties for all events on the page where you want to call the config command but do not want to send a page\_view.

### Differences between the Google Analytics 4 Cloud and Google Analytics 4 Web destinations

Segment's [Google Analytics 4 Cloud](/docs/segment/connections/destinations/catalog/actions-google-analytics-4/) server-side destination uses Google's Measurement Protocol API to send event data server to server, whereas Segment's [Google Analytics 4 Web](/docs/segment/connections/destinations/catalog/actions-google-analytics-4-web/) device-mode destination loads the gtag.js library client-side and uses Segment's event data to map to gtag.js events directly. Each destination has its own advantages and disadvantages. Your choice between the two depends on your specific use case, technical expertise, and the platforms from which you want to track data.

### User-provided data collection

Google has introduced a beta feature for collecting data provided by users, [User-provided data collection](https://support.google.com/analytics/answer/14077171?hl=en\&utm_id=ad). Note that this feature is currently not supported by Segment, and, acknowledging this feature policy in your Google Analytics 4 Account has irreversible effects.
