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
    1. Orders › Export › All orders or Orders by date › Export orders.
    2. More than 50 orders arrive by email.

    Step-by-step guide (opens in a new tab)

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

Reconcile my GA4 export

Step by step

  1. Open GA4 and click Explore in the left menu, then Free form.
  2. Set the date range at the top of the Variables column to match your Shopify export.
  3. Next to Dimensions click +, search Transaction ID, tick it and click Import.
  4. Next to Metrics click +, add Ecommerce purchases and Purchase revenue.
  5. Drag Transaction ID into Rows and both metrics into Values. Set Show rows to the largest number so every transaction is included.
  6. 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.

More guides

Updated .