Definition
transaction_id identifies an order in a GA4 purchase event.
Use one non-empty value per order and keep it unchanged in repeat copies. Google documents purchase deduplication for the same user; matching transaction IDs alone are not a universal rule across different users. The value also links refunds and order reconciliation.
- can serve as transaction_id
- order namenumeric order idcheckout token
- In practice
What does transaction_id actually do?
transaction_id gives GA4 an order key for purchase deduplication. Google describes this for transactions from the same user. Keep the same non-empty ID when the same order is sent again, and use a different ID for the next order. Do not assume that two requests from different user contexts will be reconciled just because their IDs match.
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
An omitted transaction_id and transaction_id="" are different defects. Without a usable order ID, you cannot rely on order-ID deduplication. Google explicitly warns that an empty string causes purchases with that empty value to be deduplicated. Reusing a fixed ID for distinct orders can undercount sales. Check that the value is non-empty, unique per order and stable across repeats.
Sources: Google: transaction_id
- Where to check
How do I verify transaction_id in GA4?
In DebugView, inspect transaction_id on the purchase event. In Network, compare the ID in each outgoing copy with the actual order. Receiving the parameter confirms delivery, not the final deduplicated purchase count.
In a test environment, compare a repeat of one order with a second, different order. The repeat keeps its original ID; the second order gets its own. Check the receiving property and user context, then reconcile processed purchases with the two orders. Use Explorations or the BigQuery export for order-level inspection; a count of incoming event requests is not the same as a count of processed purchases.