The following is a list of recommended events. You can also create and send your
own [custom events](https://support.google.com/analytics/answer/12229021).

> [!IMPORTANT]
> **Important:** Use `app_instance_id` instead of `client_id` for App events.

When creating custom event names, you must:

1. Follow the [Event naming rules](https://support.google.com/analytics/answer/13316687).
2. Avoid [Reserved names and prefixes](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference#reserved_names).
3. Stay within the [Event collection limits](https://support.google.com/analytics/answer/9267744), such as the 40-character limit for event and parameter names.

Refer to [Send events](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events) for more details on implementation and limitations.

## For all properties

### `ad_impression`

This event is available only for App streams.

Use this event when a user sees an ad impression.

- An `ad_impression` sent using the Measurement Protocol will *not* be included in exports to other advertising platforms such as Google Ads.
- Sending `ad_impression` events using the Measurement Protocol can cause duplicate impressions if you've configured tagging or the SDK for your linked [Google advertising products](https://support.google.com/analytics/answer/12800258). Only send an `ad_impression` event using the Measurement Protocol if the event wasn't captured by tagging or the SDK.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `ad_platform` | `string` | No | MoPub | The ad platform. |
| `ad_source` | `string` | No | AdColony | The ad source. |
| `ad_format` | `string` | No | Banner | The ad format. |
| `ad_unit_name` | `string` | No | Banner_03 | The ad unit name. |
| `currency` | `string` | No | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | No | 3.99 | The value of the ad impression. \* `value` is typically required for meaningful reporting. \* `currency` is required if you set `value`. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.google/ga4/event-builder/?c=ad_impression)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "app_instance_id": "app_instance_id",
    "events": [{
      "name": "ad_impression",
      "params": {
        "ad_platform": "MoPub",
        "ad_source": "AdColony",
        "ad_format": "Banner",
        "ad_unit_name": "Banner_03",
        "currency": "USD",
        "value": 3.99
      }
    }]
  })
});
```

<br />

### `earn_virtual_currency`

This event measures when a user is awarded virtual currency in a game.
Log this along with [spend_virtual_currency](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#spend_virtual_currency) to better understand your
virtual economy.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `virtual_currency_name` | `string` | No | Gems | The name of the virtual currency. |
| `value` | `number` | No | 5 | The value of the virtual currency. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=earn_virtual_currency)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "earn_virtual_currency",
      "params": {
        "virtual_currency_name": "Gems",
        "value": 5
      }
    }]
  })
});
```

<br />

### `join_group`

Log this event when a user joins a group such as a guild, team, or family. Use
this event to analyze how popular certain groups or social features are.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `group_id` | `string` | No | G_12345 | The ID of the group. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=join_group)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events":[{
      "name":"join_group",
      "params":{
        "group_id":"G_12345"
      }
    }]
  })
});
```

<br />

### `login`

Send this event to signify that a user has logged in to your website or app.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `method` | `string` | No | Google | The method used to login. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=login)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "login",
      "params": {
        "method": "Google"
      }
    }]
  })
});
```

<br />

### `screen_view`

This event is available only for App streams.

Use this event to signify a screen transition has occurred.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `screen_class` | `string` | No | MainActivity | The class of the screen. |
| `screen_name` | `string` | No | About | The name of the screen. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.google/ga4/event-builder/?c=screen_view)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "app_instance_id": "app_instance_id",
    "events": [{
      "name": "screen_view",
      "params": {
        "screen_class": "MainActivity",
        "screen_name": "About"
      }
    }]
  })
});
```

<br />

### `search`

Log this event to indicate when the user has performed a search. You can use
this event to identify what users are searching for on your website or app. For
example, you could send this event when a user views a search results page after
performing a search.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `search_term` | `string` | **Yes** | t-shirts | The term that was searched for. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=search)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "search",
      "params": {
        "search_term": "t-shirts"
      }
    }]
  })
});
```

<br />

### `select_content`

This event signifies that a user has selected some content of a certain type.
This event can help you identify popular content and categories of content on
your website or app.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `content_type` | `string` | No | product | The type of selected content. |
| `content_id` | `string` | No | C_12345 | An identifier for the content that was selected. The value must include at least one non-numeric character. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=select_content)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "select_content",
      "params": {
        "content_type": "product",
        "content_id": "C_12345"
      }
    }]
  })
});
```

<br />

### `share`

Use this event when a user has shared content.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `method` | `string` | No | Twitter | The method in which the content is shared. |
| `content_type` | `string` | No | image | The type of shared content. |
| `item_id` | `string` | No | C_12345 | The ID of the shared content. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=share)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "share",
      "params": {
        "method": "Twitter",
        "content_type": "image",
        "item_id": "C_12345"
      }
    }]
  })
});
```

<br />

### `sign_up`

This event indicates that a user has signed up for an account. Use this event to
understand the different behaviors of logged in and logged out users.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `method` | `string` | No | Google | The method used for sign up. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=sign_up)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "sign_up",
      "params": {
        "method": "Google"
      }
    }]
  })
});
```

<br />

### `spend_virtual_currency`

This event measures the sale of virtual goods in your app and helps you identify
which virtual goods are the most popular.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `value` | `number` | **Yes** | 5 | The value of the virtual currency. |
| `virtual_currency_name` | `string` | **Yes** | Gems | The name of the virtual currency. |
| `item_name` | `string` | No | Starter Boost | The name of the item the virtual currency is being used for. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=spend_virtual_currency)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "spend_virtual_currency",
      "params": {
        "value": 5,
        "virtual_currency_name": "Gems",
        "item_name": "Starter Boost"
      }
    }]
  })
});
```

<br />

### `tutorial_begin`

This event signifies the start of the on-boarding process. Use this in a funnel
with [tutorial_complete](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#tutorial_complete) to understand how many users complete the tutorial.

#### Parameters

No parameters are suggested for this event.

There are no parameters for this event.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=tutorial_begin)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "tutorial_begin"
    }]
  })
});
```

<br />

### `tutorial_complete`

This event signifies the user's completion of your on-boarding process. Use this
in a funnel with [tutorial_begin](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#tutorial_begin) to understand how many users complete the
tutorial.

#### Parameters

No parameters are suggested for this event.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=tutorial_complete)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "tutorial_complete"
    }]
  })
});
```

<br />

### `view_search_results`

Log this event when the user has been presented with the results of a search. Note that you can enable the view_search_results event for automatic collection through [Enhanced event measurement](https://support.google.com/analytics/answer/9216061) in Google Analytics.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `search_term` | `string` | No | Clothing | The term used for the search. |

> [!NOTE]
> **Note:** The `view_search_results` event sends the `unique_search_term` parameter with a value of 1 if the search term is unique in the current session. If the search term has already been submitted in the current session, the parameter value is 0.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=view_search_results)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "view_search_results",
      "params": {
        "search_term": "Clothing"
      }
    }]
  })
});
```

<br />

### `campaign_details`

Use this event to send campaign details that will be applied to events with a
timestamp greater than or equal to the timestamp of the `campaign_details`
event.

> [!NOTE]
> **Note:** The `campaign_details` event won't be visible in Google Analytics reports or DebugView. If you have BigQuery export enabled, this event will be present in your BigQuery event export data.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `campaign_id` | `string` | No | google_1234 | The campaign id. |
| `campaign` | `string` | No | Summer_fun | The name used to identify a specific promotion or strategic campaign. |
| `source` | `string` | No | google | The campaign traffic source (e.g. google, email, etc.). |
| `medium` | `string` | No | cpc | The campaign medium (e.g. email, cost-per-click, etc.) |
| `term` | `string` | No | summer+travel | The campaign term used with paid search to supply the keywords for ads. |
| `content` | `string` | No | logolink | The campaign content used for A/B testing and content-targeted ads to differentiate ads or links that point to the same URL. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=campaign_details)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "campaign_details",
      "params": {
        "campaign_id": "google_1234",
        "campaign": "Summer_fun",
        "source": "google",
        "medium": "cpc",
        "term": "summer+travel",
        "content": "logolink"
      }
    }]
  })
});
```

<br />

## Online sales

### `add_payment_info`

This event signifies a user has submitted their payment information in an
ecommerce checkout process.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the event. <br /> Event-level and item-level `coupon` parameters are independent. |
| `payment_type` | `string` | No | Credit Card | The chosen method of payment. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=add_payment_info)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "add_payment_info",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "coupon": "SUMMER_FUN",
        "payment_type": "Credit Card",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `add_shipping_info`

This event signifies a user has submitted their shipping information in an
ecommerce checkout process.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the event. <br /> Event-level and item-level `coupon` parameters are independent. |
| `shipping_tier` | `string` | No | Ground | The shipping tier (e.g. `Ground`, `Air`, `Next-day`) selected for delivery of the purchased item. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=add_shipping_info)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "add_shipping_info",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "coupon": "SUMMER_FUN",
        "shipping_tier": "Ground",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `add_to_cart`

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

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=add_to_cart)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "add_to_cart",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

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

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=add_to_wishlist)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "add_to_wishlist",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `begin_checkout`

This event signifies that a user has begun a checkout.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the event. <br /> Event-level and item-level `coupon` parameters are independent. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=begin_checkout)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "begin_checkout",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "coupon": "SUMMER_FUN",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `in_app_purchase`

This event is available only for App streams.

Use this event when a user [makes an in app
purchase](https://developers.google.com/firebase/docs/analytics/measure-in-app-purchases).

> [!CAUTION]
> **Caution:** Don't send an `in_app_purchase` event using the Measurement Protocol if it duplicates an event sent by the Google Analytics for Firebase (GA4F) SDK. Google Analytics doesn't automatically detect or remove duplicate `in_app_purchase` events.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the `value` of the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `transaction_id` | `string` | No | T_12345 | The unique identifier of a transaction. <br /> The `transaction_id` parameter helps you avoid getting duplicate events for a purchase. |
| `quantity` | `number` | No | 3 | Item quantity. If not set, `quantity` is set to 1. |
| `product_id` | `string` | No | ABC123456789 | The ID of the product. |
| `subscription` | `boolean` | No | true | Indicates if the purchase is a subscription. If not set, defaults to `false`. |
| `free_trial` | `boolean` | No | true | Indicates if the event is for a free trial of a subscription. If not set, defaults to `false`. |
| `price_is_discounted` | `boolean` | No | false | Indicates if the `price` is discounted. If not set, defaults to `false`. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.google/ga4/event-builder/?c=in_app_purchase)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "app_instance_id": "app_instance_id",
    "events":[{
      "name":"in_app_purchase",
      "params":{
        "currency": "USD",
        "value": 30.03,
        "quantity": 3,
        "transaction_id": "T_12345",
        "product_id": "ABC123456789",
        "subscription": true,
        "free_trial": false,
        "price_is_discounted": false
      }
    }]
  })
});
```

<br />

### `purchase`

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

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `customer_type` | `string` (`new` / `returning`) | No | new | Is the conversion from a \`new\` or \`returning\` customer? - `new`: New customer who hasn't purchased within a given time period (540-day window recommended and set at default, but not required). - `returning`: A returning customer who has purchased during the given time period. <br /> Don't specify a value if there's uncertainty (for example, if the user checked out as a guest). |
| `transaction_id` | `string` | **Yes** | T_12345 | The unique identifier of a transaction. <br /> The `transaction_id` parameter helps you avoid getting duplicate events for a purchase. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the event. <br /> Event-level and item-level `coupon` parameters are independent. |
| `shipping` | `number` | No | 3.33 | Shipping cost associated with a transaction. |
| `tax` | `number` | No | 1.11 | Tax cost associated with a transaction. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=purchase)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
    method: "POST",
    body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "purchase",
      "params": {
        "currency": "USD",
        "transaction_id": "T_12345",
        "value": 30.03,
        "coupon": "SUMMER_FUN",
        "shipping": 3.33,
        "tax": 1.11,
        "items": [
            {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `refund`

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

> [!NOTE]
> **Note:** We recommend that you include item information in your `refund` event to see item-level refund metrics in Analytics.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `transaction_id` | `string` | **Yes** | T_12345 | The unique identifier of a transaction. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the event. <br /> Event-level and item-level `coupon` parameters are independent. |
| `shipping` | `number` | No | 3.33 | Shipping cost associated with a transaction. |
| `tax` | `number` | No | 1.11 | Tax cost associated with a transaction. |
| `items` | ` https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#refund_item ` | No\* |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=refund)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "refund",
      "params": {
        "currency": "USD",
        "transaction_id": "T_12345",
        "value": 30.03,
        "coupon": "SUMMER_FUN",
        "shipping": 3.33,
        "tax": 1.11,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `remove_from_cart`

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

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=remove_from_cart)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "remove_from_cart",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

### `select_item`

This event signifies an item was selected from a list.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> Ignored if set at the item-level. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> Ignored if set at the item-level. |
| `items` | `https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#select_item_item` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=select_item)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "select_item",
      "params": {
        "item_list_id": "related_products",
        "item_list_name": "Related products",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `select_promotion`

This event signifies a promotion was selected from a list.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `creative_name` | `string` | No | summer_banner2 | The name of the promotional creative. |
| `creative_slot` | `string` | No | featured_app_1 | The name of the promotional creative slot associated with the event. |
| `promotion_id` | `string` | No | P_12345 | The ID of the promotion associated with the event. |
| `promotion_name` | `string` | No | Summer Sale | The name of the promotion associated with the event. |
| `items` | ` https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#select_promotion_item` | **No\*** |   | The items for the event. <br /> \* If the `items` array is not included, then some reports, such as the [Promotions report](https://support.google.com/analytics/answer/13458990), and metrics won't include this promotion event. |

> [!NOTE]
> To populate item-scoped promotion dimensions, such as "Item promotion ID" or "Item promotion name", in Google Analytics reports, Google Analytics first looks for the corresponding promotion parameters (`promotion_id`, `promotion_name`, `creative_name`, and `creative_slot`) within each specific object in the `items` array of your ecommerce events. If a parameter is not found within the item object, Google Analytics will then use the value from the \*event-level\* parameter if one is provided. An item-scoped promotion dimension for a particular item will only report as "(not set)" if the relevant parameter is missing from \*both\* the item object and the event-level parameters. Item-level parameters always take precedence over event-level parameters.

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `creative_name` | `string` | No | summer_banner2 | The name of the promotional creative. <br /> Defaults to event-level `creative_name` if not set. |
| `creative_slot` | `string` | No | featured_app_1 | The name of the promotional creative slot associated with the item. <br /> Defaults to event-level `creative_slot` if not set. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `promotion_id` | `string` | No | P_12345 | The ID of the promotion associated with the item. <br /> Defaults to event-level `promotion_id` if not set. |
| `promotion_name` | `string` | No | Summer Sale | The name of the promotion associated with the item. <br /> Defaults to event-level `promotion_name` if not set. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=select_promotion)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "select_promotion",
      "params": {
        "creative_name": "Summer Banner",
        "creative_slot": "featured_app_1",
        "promotion_id": "P_12345",
        "promotion_name": "Summer Sale",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "creative_name": "summer_banner2",
            "creative_slot": "featured_app_1",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "promotion_id": "P_12345",
            "promotion_name": "Summer Sale",
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `view_cart`

This event signifies that a user viewed their cart.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=view_cart)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "view_cart",
      "params": {
        "currency": "USD",
        "value": 7.77,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `view_item`

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

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* Set `value` to the sum of `(price * quantity)` for all items in `items`. Don't include `shipping` or `tax`. \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=view_item)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "view_item",
      "params": {
        "currency": "USD",
        "value": 7.77,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ],
      }
    }]
  })
});
```

<br />

### `view_item_list`

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

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the items associated with the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> Value metrics on the `view_item` event to not contribute to revenue <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> Ignored if set at the item-level. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> Ignored if set at the item-level. |
| `items` | `Array<Item>` | **Yes** |   | The items for the event. |

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=view_item_list)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "view_item_list",
      "params": {
        "item_list_id": "related_products",
        "item_list_name": "Related products",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

### `view_promotion`

This event signifies a promotion was viewed from a list.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `creative_name` | `string` | No | summer_banner2 | The name of the promotional creative. |
| `creative_slot` | `string` | No | featured_app_1 | The name of the promotional creative slot associated with the event. |
| `promotion_id` | `string` | No | P_12345 | The ID of the promotion associated with the event. |
| `promotion_name` | `string` | No | Summer Sale | The name of the promotion associated with the event. |
| `items` | `https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_promotion_item` | **Yes** |   | The items for the event. |

> [!NOTE]
> To populate item-scoped promotion dimensions, such as "Item promotion ID" or "Item promotion name", in Google Analytics reports, Google Analytics first looks for the corresponding promotion parameters (`promotion_id`, `promotion_name`, `creative_name`, and `creative_slot`) within each specific object in the `items` array of your ecommerce events. If a parameter is not found within the item object, Google Analytics will then use the value from the \*event-level\* parameter if one is provided. An item-scoped promotion dimensions for a particular item will only report as "(not set)" if the relevant parameter is missing from \*both\* the item object and the event-level parameters. Item-level parameters always take precedence over event-level parameters.

#### Item parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `item_id` | `string` | **Yes\*** | SKU_12345 | The ID of the item. \*One of `item_id` or `item_name` is required. |
| `item_name` | `string` | **Yes\*** | Stan and Friends Tee | The name of the item. \*One of `item_id` or `item_name` is required. |
| `affiliation` | `string` | No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. Note: `affiliation` is only available at the item-scope. |
| `coupon` | `string` | No | SUMMER_FUN | The coupon name/code associated with the item. <br /> Event-level and item-level `coupon` parameters are independent. |
| `creative_name` | `string` | No | summer_banner2 | The name of the promotional creative. <br /> Defaults to event-level `creative_name` if not set. |
| `creative_slot` | `string` | No | featured_app_1 | The name of the promotional creative slot associated with the item. <br /> Defaults to event-level `creative_slot` if not set. |
| `discount` | `number` | No | 2.22 | The unit monetary discount value associated with the item. |
| `index` | `number` | No | 5 | The index/position of the item in a list. |
| `item_brand` | `string` | No | Google | The brand of the item. |
| `item_category` | `string` | No | Apparel | The category of the item. If used as part of a category hierarchy or taxonomy then this will be the first category. |
| `item_category2` | `string` | No | Adult | The second category hierarchy or additional taxonomy for the item. |
| `item_category3` | `string` | No | Shirts | The third category hierarchy or additional taxonomy for the item. |
| `item_category4` | `string` | No | Crew | The fourth category hierarchy or additional taxonomy for the item. |
| `item_category5` | `string` | No | Short sleeve | The fifth category hierarchy or additional taxonomy for the item. |
| `item_list_id` | `string` | No | related_products | The ID of the list in which the item was presented to the user. <br /> If set, event-level `item_list_id` is ignored. If not set, event-level `item_list_id` is used, if present. |
| `item_list_name` | `string` | No | Related products | The name of the list in which the item was presented to the user. <br /> If set, event-level `item_list_name` is ignored. If not set, event-level `item_list_name` is used, if present. |
| `item_variant` | `string` | No | green | The item variant or unique code or description for additional item details/options. |
| `location_id` | `string` | No | ChIJIQBpAG2ahYAR_6128GcTUEo (the Google Place ID for San Francisco) | The physical location associated with the item (e.g. the physical store location). It's recommended to use the [Google Place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) that corresponds to the associated item. A custom location ID can also be used. Note: `location_id` is only available at the item-scope. |
| `price` | `number` | No | 10.01 | The monetary unit price of the item, in units of the specified currency parameter. <br /> If a discount applies to the item, set `price` to the discounted unit price and specify the unit price discount in the `discount` parameter. |
| `promotion_id` | `string` | No | P_12345 | The ID of the promotion associated with the item. <br /> Defaults to event-level `promotion_id` if not set. |
| `promotion_name` | `string` | No | Summer Sale | The name of the promotion associated with the item. <br /> Defaults to event-level `promotion_name` if not set. |
| `quantity` | `number` | No | 3 | Item quantity. <br /> If not set, `quantity` is set to 1. |

In addition to the prescribed parameters, you can include up to 27 [custom parameters](https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce) in the `items` array.

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=view_promotion)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "view_promotion",
      "params": {
        "creative_name": "Summer Banner",
        "creative_slot": "featured_app_1",
        "promotion_id": "P_12345",
        "promotion_name": "Summer Sale",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Merchandise Store",
            "coupon": "SUMMER_FUN",
            "creative_name": "summer_banner2",
            "creative_slot": "featured_app_1",
            "currency": "USD",
            "discount": 2.22,
            "index": 0,
            "item_brand": "Google",
            "item_category": "Apparel",
            "item_category2": "Adult",
            "item_category3": "Shirts",
            "item_category4": "Crew",
            "item_category5": "Short sleeve",
            "item_list_id": "related_products",
            "item_list_name": "Related Products",
            "item_variant": "green",
            "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo",
            "price": 10.01,
            "promotion_id": "P_12345",
            "promotion_name": "Summer Sale",
            "google_business_vertical": "retail",
            "quantity": 3
          }
        ]
      }
    }]
  })
});
```

<br />

## Games

### `level_up`

This event signifies that a player has leveled up in a game. Use it to gauge the
level distribution of your user base and identify levels that are difficult to
complete.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `level` | `number` | No | 5 | The level of the character. |
| `character` | `string` | No | Player 1 | The character that leveled up. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=level_up)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "level_up",
      "params": {
        "level": 5,
        "character": "Player 1"
      }
    }]
  })
});
```

<br />

### `post_score`

Send this event when the user posts a score. Use this event to understand how
users are performing in your game and correlate high scores with audiences or
behaviors.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `score` | `number` | **Yes** | 10000 | The score to post. |
| `level` | `number` | No | 5 | The level for the score. |
| `character` | `string` | No | Player 1 | The character that achieved the score. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=post_score)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "post_score",
      "params": {
        "score": 10000,
        "level": 5,
        "character": "Player 1"
      }
    }]
  })
});
```

<br />

### `unlock_achievement`

Log this event when the user has unlocked an achievement. This event can help
you understand how users are experiencing your game.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `achievement_id` | `string` | **Yes** | A_12345 | The id of the achievement that was unlocked. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=unlock_achievement)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "unlock_achievement",
      "params": {
        "achievement_id": "A_12345"
      }
    }]
  })
});
```

<br />

## Lead generation

### `close_convert_lead`

Log this event when a qualified lead is successfully converted into a customer.
This typically signifies the end of the lead nurturing process, such as when a
contract is signed, a paid subscription starts, or a final sale is completed.

- **Note:** To track initial lead acquisition, such as form submissions, newsletter sign-ups, or demo requests, use the [`generate_lead`](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#generate_lead) event.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | No | USD | Currency of the value associated with the conversion (such as contract value), in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. Required if `value` is set. |
| `value` | `number` | No | 2500 | The monetary value of the conversion, such as first payment amount or contract value. Required if `currency` is set. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=close_convert_lead)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "close_convert_lead",
      "params": {
        "currency": "USD",
        "value": 30.03
      }
    }]
  })
});
```

<br />

### `close_unconvert_lead`

This event measures when a user is marked as not becoming a converted lead,
along with the reason.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the `value` of the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `unconvert_lead_reason` | `string` | No | Never responded | The reason the lead was unconverted. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=close_unconvert_lead)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "close_unconvert_lead",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "unconvert_lead_reason": "Never responded"
      }
    }]
  })
});
```

<br />

### `disqualify_lead`

This event measures when a user is marked as disqualified to become a lead,
along with the reason for the disqualification.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the `value` of the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `disqualified_lead_reason` | `string` | No | Not looking to buy | The reason a lead was marked as disqualified. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=disqualify_lead)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "disqualify_lead",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "disqualified_lead_reason": "Not looking to buy"
      }
    }]
  })
});
```

<br />

### `generate_lead`

This event measures when a lead has been generated (for example, through a
form). Log this to understand the effectiveness of your marketing campaigns and
how many customers re-engage with your business after remarketing to the
customers.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the `value` of the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `lead_source` | `string` | No | Trade show | The source of the lead. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=generate_lead)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "generate_lead",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "lead_source": "Trade show"
      }
    }]
  })
});
```

<br />

### `qualify_lead`

This event measures when a user is marked as meeting the criteria to become a
qualified lead.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the `value` of the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=qualify_lead)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "qualify_lead",
      "params": {
        "currency": "USD",
        "value": 30.03
      }
    }]
  })
});
```

<br />

### `working_lead`

This event measures when a user contacts or is contacted by a representative.

#### Parameters

| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| `currency` | `string` | **Yes\*** | USD | Currency of the `value` of the event, in [3-letter ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. <br /> \* If you set `value` then `currency` is required for revenue metrics to be computed accurately. |
| `value` | `number` | **Yes\*** | 30.03 | The monetary value of the event. <br /> \* `value` is typically required for meaningful reporting. If you [mark the event as a key event](https://support.google.com/analytics/answer/9267568) then it's recommended you set `value`. \* `currency` is required if you set `value`. |
| `lead_status` | `string` | No | Started conversations | The status of the lead. |

#### Send event

[Try this event in the Google Analytics Event Builder](https://ga-dev-tools.web.app/ga4/event-builder/?c=working_lead)


```javascript
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = '<secret_value>';
 
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, {
  method: "POST",
  body: JSON.stringify({
    "client_id": "client_id",
    "events": [{
      "name": "working_lead",
      "params": {
        "currency": "USD",
        "value": 30.03,
        "lead_status": "Started conversations"
      }
    }]
  })
});
```

<br />