GA4 and Shopify guide
How to export GA4 transaction IDs to CSV
What you’ll need
Your orders export CSV (for the dates you want to compare)
How to get this: Your orders export CSV
- Orders › Export › All orders or Orders by date › Export orders.
- More than 50 orders arrive by email.
A GA4 export with the Transaction ID dimension (Viewer access to the GA4 property)
How to get this: A GA4 export with the Transaction ID dimension
In GA4: Explore › Free form, add the dimension Transaction ID and the metric Ecommerce purchases, set the same dates, then Export data › Download CSV.
Step by step
- Open GA4 and click Explore in the left menu, then Free form.
- Set the date range at the top of the Variables column to match your Shopify export.
- Next to Dimensions click +, search Transaction ID, tick it and click Import.
- Next to Metrics click +, add Ecommerce purchases and Purchase revenue.
- Drag Transaction ID into Rows and both metrics into Values. Set Show rows to the largest number so every transaction is included.
- Click Export data (the download icon at the top right) › Download CSV.
Other formats that work
- A standard report with a Transaction ID column, from Share this report › Download File › Download CSV (up to 100,000 rows).
- A BigQuery export: select ecommerce.transaction_id (and event_date, ecommerce.purchase_revenue) where event_name = 'purchase'.
- A plain list of IDs copied from GA4, one per line.
“(not set)” in the Transaction ID column
Purchases listed as (not set) were sent without a transaction_id, so they can’t be matched to an order and GA4 can’t de-duplicate them. Fix the tag so it sends the order number as transaction_id.