Within the GA4 BigQuery export, you’ll find a wealth of data in the ecommerce fields, which provide comprehensive information about the various e-commerce events collected by Google Analytics 4.
These columns hold valuable details that can help you analyze and understand the performance of your e-commerce activities.
Field Name | Data Type | Description | Example Values |
---|---|---|---|
ecommerce.total_item_quantity | INTEGER | Number of items collected in the event (sum of items.quantity) | 1, 2, 3, etc. |
ecommerce.purchase_revenue | FLOAT | Purchase revenue for the event Note: only populated for the purchase event | 1.99, 6.50, 22.98 |
ecommerce.tax_value | FLOAT | Tax value for the event | 0.50, 1.12, 2.99 |
ecommerce.shipping_value | FLOAT | Shipping cost value for the event | 0.99, 1.50, 2.98 |
ecommerce.refund_value | FLOAT | Refund value for the event Note: only populated for the refund event | 1.99, 6.50, 22.98 |
ecommerce.purchase_revenue_in_usd | FLOAT | Purchase revenue for the event, converted to USD Note: only populated for the purchase event | 1.99, 6.50, 22.98 |
ecommerce.tax_value_in_usd | FLOAT | Tax value for the event, converted to USD | 0.50, 1.12, 2.99 |
ecommerce.shipping_value_in_usd | FLOAT | Shipping cost value for the event, converted to USD | 0.99, 1.50, 2.98 |
ecommerce.refund_value_in_usd | FLOAT | Refund value for the event, converted to USD Note: only populated for the refund event | 1.99, 6.50, 22.98 |
ecommerce.transaction_id | STRING | The transaction ID passed in with the event | A value unique to your business |
ecommerce.unique_items | INTEGER | Number of unique items in the event (based on item_id, item_name, item_brand) | 1, 2, 3, etc. |
Sample ecommerce fields query
Select the ecommerce fields you need from the below query.
SELECT
ecommerce.total_item_quantity,
ecommerce.purchase_revenue,
ecommerce.tax_value,
ecommerce.shipping_value,
ecommerce.refund_value,
ecommerce.purchase_revenue_in_usd,
ecommerce.tax_value_in_usd,
ecommerce.shipping_value_in_usd,
ecommerce.refund_value_in_usd,
ecommerce.transaction_id,
ecommerce.unique_items
FROM `<project>.<dataset>.<table>`
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: