When Google Analytics collects e-commerce events, the export may include details about the items involved in those events. These item details are structured within a REPEATED field called items, which can hold multiple item records.
It’s important to note that the availability of this item data relies on your specific GA4 implementation, as GA4 doesn’t automatically collect this information.
Field Name | Data Type | Description | Example Values |
---|---|---|---|
items.item_id | STRING | ID of the item | A value unique to your business |
items.item_name | STRING | Name of the item | A value unique to your business |
items.item_brand | STRING | Brand of the item | A value unique to your business |
items.item_variant | STRING | Variant of the item | A value unique to your business |
items.item_category | STRING | Category of the item | A value unique to your business |
items.item_category2 | STRING | Subcategory 2 of the item | A value unique to your business |
items.item_category3 | STRING | Subcategory 3 of the item | A value unique to your business |
items.item_category4 | STRING | Subcategory 4 of the item | A value unique to your business |
items.item_category5 | STRING | Subcategory 5 of the item | A value unique to your business |
items.quantity | INTEGER | Quantity of the item | 1, 2, 3, etc. |
items.price | FLOAT | Price of the item | 1.99, 5.00, 8.50 |
items.item_revenue | FLOAT | Revenue of the item Note: only populated for the purchase event | 2.50, 3.90, 22.56 |
items.item_refund | FLOAT | Refund value of the item Note: only populated for the refund event | 1.99, 5.00, 8.50 |
items.price_in_usd | FLOAT | Price of the item, converted to USD | 1.99, 5.00, 8.50 |
items.item_revenue_in_usd | FLOAT | Revenue of the item, converted to USD Note: only populated for the purchase event | 2.50, 3.90, 22.56 |
items.item_refund_in_usd | FLOAT | Refund value of the item, converted to USD Note: only populated for the refund event | 1.99, 5.00, 8.50 |
items.coupon | STRING | Coupon code for the item | A value unique to your business |
items.affiliation | STRING | Affiliation for the item | A value unique to your business |
items.location_id | STRING | Location for the item | A value unique to your business |
items.item_list_id | STRING | The ID of the list in which the item was included | A value unique to your business |
items.item_list_name | STRING | The name of the list in which the item was included | A value unique to your business |
Items.item_list_index | STRING | The position of the item in the list | 1, 2, 3, etc. |
items.promotion_id | STRING | The ID of a product promotion | A value unique to your business |
items.promotion_name | STRING | The name of a product promotion | A value unique to your business |
items.creative_name | STRING | The name of the creative used in the promotional spot | A value unique to your business |
items.creative_slot | STRING | The name of a creative slot | A value unique to your business |
Sample item fields query
Select the item fields you need from the below query.
SELECT
items.item_id,
items.item_name,
items.item_brand,
items.item_variant,
items.item_category,
items.item_category2,
items.item_category3,
items.item_category4,
items.item_category5,
items.quantity,
items.price,
items.item_revenue,
items.item_refund,
items.price_in_usd,
items.item_revenue_in_usd,
items.item_refund_in_usd,
items.coupon,
items.affiliation,
items.location_id,
items.item_list_id,
items.item_list_name,
items.item_list_index,
items.promotion_id,
items.promotion_name,
items.creative_name,
items.creative_slot
FROM `<project>.<dataset>.<table>`, UNNEST(items) AS items
Important Note: Make sure you replace the placeholders within the WHERE clause with the specific values for the table you are working with. For example, if you want to extract data for January 31st 2021 from the e-commerce sample dataset, use the following values:
- <project> should be replaced with bigquery-public-data
- <dataset> should be replaced with ga4_obfuscated_sample_ecommerce
- <table> should be replaced with events_20210131
Ensure that you substitute these placeholders with your actual project, dataset, and table names when executing the queries.
For details and examples of other fields & dimensions see: