Ecommerce fields & dimensions

Ecommerce Fields & Dimensions

Published:

Written by:

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 NameData TypeDescriptionExample Values
ecommerce.total_item_quantityINTEGERNumber of items collected in the event (sum of items.quantity)1, 2, 3, etc.
ecommerce.purchase_revenueFLOATPurchase revenue for the event 
Note: only populated for the purchase event
1.99, 6.50, 22.98
ecommerce.tax_valueFLOATTax value for the event0.50, 1.12, 2.99
ecommerce.shipping_valueFLOATShipping cost value for the event0.99, 1.50, 2.98
ecommerce.refund_valueFLOATRefund value for the event 
Note: only populated for the refund event
1.99, 6.50, 22.98
ecommerce.purchase_revenue_in_usdFLOATPurchase revenue for the event, converted to USD
Note: only populated for the purchase event
1.99, 6.50, 22.98
ecommerce.tax_value_in_usdFLOATTax value for the event, converted to USD0.50, 1.12, 2.99
ecommerce.shipping_value_in_usdFLOATShipping cost value for the event, converted to USD0.99, 1.50, 2.98
ecommerce.refund_value_in_usdFLOATRefund value for the event, converted to USD
Note: only populated for the refund event
1.99, 6.50, 22.98
ecommerce.transaction_idSTRINGThe transaction ID passed in with the eventA value unique to your business
ecommerce.unique_itemsINTEGERNumber 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:

New to the GA4 BigQuery export? Check out our free introductory guide.

X