What Is transaction_id in GA4?
transaction_id is the parameter on a GA4 purchase event that identifies the order the event belongs to.
GA4 uses it to deduplicate purchase events: if two purchase events carry the same transaction_id, Analytics keeps one rather than counting the order twice. It is also the field that lets purchase records be matched order by order against a commerce backend, which is the basis of order-level reconciliation.
- can serve as transaction_id
- order namenumeric order idcheckout token
Daniil Maximkin Published Reviewed
- In practice
What does transaction_id actually do?
transaction_id names the order a purchase event belongs to and gives GA4 a key for deduplication. If two purchase events carry the same value, Analytics keeps one rather than counting the order twice, which is what stops a reloaded confirmation page or a double-firing tag from inflating purchases and revenue.
The same value is expected on a refund event so the refund ties back to the original order.
- In practice
Is transaction_id the same as event_id?
transaction_id
a GA4 ecommerce parameter that names an order.
event_id
a Meta parameter that pairs a browser Pixel event with its server-side copy.
They solve different problems on different platforms, and a setup sending both should not reuse one value in place of the other.
transaction_id is also not the same as Shopify’s numeric order id. Shopify exposes more than one identifier for the same order, and each implementation chooses among them.
- In practice
Where does the value come from on Shopify?
The value is whatever the integration reads from the order or checkout object and passes into the purchase event. Shopify exposes several candidates, so the choice is an implementation decision.
The order name is the reference shown on the confirmation page and in the admin. The numeric order id is used by the Admin API and in order URLs. The checkout token identifies the checkout session before it becomes an order. Any can serve as transaction_id, and implementations choose differently — but the chosen value must be used consistently by every tag that fires the purchase, including the server-side copy, or deduplication and order matching break.
- Not to be confused with
A missing or duplicated transaction_id is easy to miss because the purchase event still arrives. GA4 deduplicates on the value it receives: a value reused across orders can make a later purchase look like a duplicate, and a missing value leaves nothing to deduplicate on. Check the parameter, not just the event count.
- Where to check
How do I verify transaction_id in GA4?
In DebugView, open the purchase event and read its parameters; a transaction_id that matches the order confirms the tag is sending it. The browser’s network request to the analytics endpoint shows the same value in the raw payload.
For verification beyond a single event, use Explorations with transaction_id as a dimension, or read the value out of the BigQuery export for purchase events, then match those values against a Shopify order export.