A transaction ID is the unique reference attached to an order or payment when it is reported to analytics and advertising platforms, usually the same order number your shop or booking system creates. It lets each tool recognise one purchase as one purchase, however many times the confirmation page loads.
How a transaction ID works
When a customer completes a purchase, your site sends a purchase event to GA4 and conversion events to platforms such as Google Ads and Meta. Alongside the value, currency and items, the event carries the transaction ID, which GA4 calls transaction_id. If the same ID arrives again, because the customer refreshed the confirmation page, came back to it from an email or opened it in a second tab, GA4 can treat the repeat as a duplicate rather than a new sale.
Google Ads uses the ID in the same way for its own conversion counting, and it is also the reference you use to adjust or retract a conversion later, for example after a return. Meta matches duplicates between its browser pixel and its Conversions API using an event ID, which many setups set to the order number for purchases.
Refunds rely on the same reference. A refund event sent to GA4 with the original transaction ID records the refund against the right order, so revenue in your reports reflects what you actually kept.
Why it matters
Without a reliable transaction ID, the revenue in your reports drifts away from what reaches the bank. Duplicate transactions inflate revenue and return on ad spend, and that can push automated bidding to spend more on campaigns that are not earning it.
The ID is also the bridge between marketing data and finance data. A UK online shop reconciling GA4 with Shopify, WooCommerce or its accounting software can match order by order and see exactly which sales tracking missed. That is often the quickest way to spot a broken return from a payment provider, where customers pay on another site and never reach your confirmation page.
Common mistakes
- Leaving the ID blank or hard-coding a placeholder such as “12345”, so every order looks like the same order.
- Generating a random ID each time the page loads instead of using the real order number, which defeats deduplication on refresh.
- Putting a customer’s email address, name or postcode in the ID. That is personal data and has no place in analytics.
- Using different references in GA4, Google Ads and Meta, or the same reference in different formats such as “#1042” in one and “1042” in another, so nothing can be reconciled.
- Firing the purchase event on a page customers revisit, such as an order history page, without any check on the ID.
How to act on it
Pick a handful of recent orders, find each one in your shop’s admin, then look for the same number in GA4 using an exploration with the Transaction ID dimension. If IDs are missing, repeated or do not match, fix the data layer so the confirmation page pushes the real order number with the purchase. If you take payments through more than one system, such as a shop and a separate booking tool, make sure their number ranges cannot clash, for example by adding a short prefix to one of them.
Then test: place an order and refresh the confirmation page several times; revenue should rise once. Getting purchase tracking right is the foundation of the ecommerce work I do in performance marketing, because every bid and budget decision rests on it.
