Events

add_payment_info

This event signifies a user has submitted their payment information.

Parameters

Name Type Required Example value Description
currency string Yes* USD Currency of the items associated with the event, in 3-letter ISO 4217 format.

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 7.77,
        "coupon": "SUMMER_FUN",
        "payment_type": "Credit Card",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

add_shipping_info

This event signifies a user has submitted their shipping information.

Parameters

Name Type Required Example value Description
currency string Yes* USD Currency of the items associated with the event, in 3-letter ISO 4217 format.

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 7.77,
        "coupon": "SUMMER_FUN",
        "shipping_tier": "Ground",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 7.77,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 7.77,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 7.77,
        "coupon": "SUMMER_FUN",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

earn_virtual_currency

This event measures the awarding of virtual currency. Log this along with 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 GA4 Event Builder

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
      }
    }]
  })
});

generate_lead

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

Parameters

Name Type Required Example value Description
currency string Yes* USD Currency of the items associated with the event, in 3-letter ISO 4217 format.

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion then it's recommended you set value.
* currency is required if you set value.

Send Event

Try this event in the GA4 Event Builder

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": 99.99
      }
    }]
  })
});

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 GA4 Event Builder

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"
      }
    }]
  })
});

level_up

This event signifies that a player has leveled up. Use it to gauge the level distribution of your userbase 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 GA4 Event Builder

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"
      }
    }]
  })
});

login

Send this event to signify that a user has logged in.

Parameters

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

Send Event

Try this event in the GA4 Event Builder

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"
      }
    }]
  })
});

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 GA4 Event Builder

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"
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* 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* 12.21 The monetary value of the event.

* value is required for meaningful reporting and to populate the purchasers predictive audience.
* currency is required if you set value.
affiliation string No Google Store A product affiliation to designate a supplying company or brick and mortar store location.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the event.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 12.21,
        "affiliation": "Google Store",
        "coupon": "SUMMER_FUN",
        "shipping": 3.33,
        "tax": 1.11,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

refund

This event signifies a refund was issued.

Parameters

Name Type Required Example value Description
currency string Yes* USD Currency of the items associated with the event, in 3-letter ISO 4217 format.

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* 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* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion then it's recommended you set value.
* currency is required if you set value.
affiliation string No Google Store A product affiliation to designate a supplying company or brick and mortar store location.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the event.

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> No* The items for the event.

* items is required for partial refunds but it can be omitted for full refunds.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 12.21,
        "affiliation": "Google Store",
        "coupon": "SUMMER_FUN",
        "shipping": 3.33,
        "tax": 1.11,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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": 7.77,
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

Use this event to contextualize search operations. This event can help you identify the most popular content in your app.

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 GA4 Event Builder

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"
      }
    }]
  })
});

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 in your app.

Parameters

Name Type Required Example value Description
content_type string No product The type of selected content.
item_id string No I_12345 An identifier for the item that was selected.

Send Event

Try this event in the GA4 Event Builder

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",
        "item_id": "I_12345"
      }
    }]
  })
});

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.

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.

Ignored if set at the item-level.
items Array<Item> Yes* The items for the event.

* The items array is expected to have a single element, representing the selected item. If multiple elements are provided, only the first element in items will be used.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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 Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

select_promotion

This event signifies an 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.

Ignored if set at the item-level.
creative_slot string No featured_app_1 The name of the promotional creative slot associated with the event.

Ignored if set at the item-level.
location_id string No L_12345 The ID of the location.

Ignored if set at the item-level.
promotion_id string No P_12345 The ID of the promotion associated with the event.

Ignored if set at the item-level.
promotion_name string No Summer Sale The name of the promotion associated with the event.

Ignored if set at the item-level.
items Array<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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
creative_name string No summer_banner2 The name of the promotional creative.

If set, event-level creative_name is ignored.
If not set, event-level creative_name is used, if present.
creative_slot string No featured_app_1 The name of the promotional creative slot associated with the item.

If set, event-level creative_slot is ignored.
If not set, event-level creative_slot is used, if present.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
promotion_id string No P_12345 The ID of the promotion associated with the item.

If set, event-level promotion_id is ignored.
If not set, event-level promotion_id is used, if present.
promotion_name string No Summer Sale The name of the promotion associated with the item.

If set, event-level promotion_name is ignored.
If not set, event-level promotion_name is used, if present.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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",
        "location_id": "L_12345",
        "promotion_id": "P_12345",
        "promotion_name": "Summer Sale",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "creative_name": "summer_banner2",
            "creative_slot": "featured_app_1",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "promotion_id": "P_12345",
            "promotion_name": "Summer Sale",
            "quantity": 1
          }
        ]
      }
    }]
  })
});

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 GA4 Event Builder

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"
      }
    }]
  })
});

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 GA4 Event Builder

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"
      }
    }]
  })
});

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 GA4 Event Builder

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"
      }
    }]
  })
});

tutorial_begin

This event signifies the start of the on-boarding process. Use this in a funnel with 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 GA4 Event Builder

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"
    }]
  })
});

tutorial_complete

This event signifies the user's completion of your on-boarding process. Use this in a funnel with 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 GA4 Event Builder

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"
    }]
  })
});

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 GA4 Event Builder

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"
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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 Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

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

If set, item-level currency is ignored.
If not set, currency from the first item in items is used.

* If you set value then currency is required for revenue metrics to be computed accurately.
value number Yes* 7.77 The monetary value of the event.

* value is typically required for meaningful reporting. If you mark the event as a conversion 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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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 Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ],
      }
    }]
  })
});

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
item_list_id string No related_products The ID of the list in which the item was presented to the user.

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.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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 Store",
            "coupon": "SUMMER_FUN",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "quantity": 1
          }
        ]
      }
    }]
  })
});

view_promotion

This event signifies an 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.

Ignored if set at the item-level.
creative_slot string No featured_app_1 The name of the promotional creative slot associated with the event.

Ignored if set at the item-level.
location_id string No L_12345 The ID of the location.

Ignored if set at the item-level.
promotion_id string No P_12345 The ID of the promotion associated with the event.

Ignored if set at the item-level.
promotion_name string No Summer Sale The name of the promotion associated with the event.

Ignored if set at the item-level.
items Array<Item> Yes* The items for the event.

* The items array is expected to have a single element, representing the item associated with the promotion. If multiple elements are provided, only the first element in items will be used.

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.

Event-level and item-level affiliation parameters are independent.
coupon string No SUMMER_FUN The coupon name/code associated with the item.

Event-level and item-level coupon parameters are independent.
currency string No USD The currency, in 3-letter ISO 4217 format.

If set, event-level currency is ignored.

Multiple currencies per event is not supported. Each item should set the same currency.
creative_name string No summer_banner2 The name of the promotional creative.

If set, event-level creative_name is ignored.
If not set, event-level creative_name is used, if present.
creative_slot string No featured_app_1 The name of the promotional creative slot associated with the item.

If set, event-level creative_slot is ignored.
If not set, event-level creative_slot is used, if present.
discount number No 2.22 The 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.

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.

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 L_12345 The location associated with the item. It's recommended to use the Google Place ID that corresponds to the associated item. A custom location ID can also be used.

If set, event-level location_id is ignored.
If not set, event-level location_id is used, if present.
price number No 9.99 The monetary price of the item, in units of the specified currency parameter.
promotion_id string No P_12345 The ID of the promotion associated with the item.

If set, event-level promotion_id is ignored.
If not set, event-level promotion_id is used, if present.
promotion_name string No Summer Sale The name of the promotion associated with the item.

If set, event-level promotion_name is ignored.
If not set, event-level promotion_name is used, if present.
quantity number No 1

Item quantity.

Send Event

Try this event in the GA4 Event Builder

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",
        "location_id": "L_12345",
        "promotion_id": "P_12345",
        "promotion_name": "Summer Sale",
        "items": [
          {
            "item_id": "SKU_12345",
            "item_name": "Stan and Friends Tee",
            "affiliation": "Google Store",
            "coupon": "SUMMER_FUN",
            "creative_name": "summer_banner2",
            "creative_slot": "featured_app_1",
            "currency": "USD",
            "discount": 2.22,
            "index": 5,
            "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": "L_12345",
            "price": 9.99,
            "promotion_id": "P_12345",
            "promotion_name": "Summer Sale",
            "quantity": 1
          }
        ]
      }
    }]
  })
});

view_search_results

Log this event when the user has been presented with the results of a search.

Parameters

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

Send Event

Try this event in the GA4 Event Builder

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"
      }
    }]
  })
});