A transaction ID lets Google Analytics 4 and Google Ads recognise the same purchase sent twice and count it once. GA4 drops a repeat purchase event that carries a transaction ID it has already seen for that user. Google Ads drops a repeat conversion only when both share the same conversion action and the same ID. The ID only helps when it is unique per order: an empty ID or one fixed value for every order makes both tools merge real, different purchases, and your revenue comes in low with no error to warn you.
What each tool deduplicates
| GA4 | Google Ads | |
|---|---|---|
| Field | transaction_id on the purchase event |
transaction_id on the conversion (the "order ID" in some upload tools) |
| What counts as a duplicate | A second purchase with an ID already seen from the same user | A second conversion with the same ID in the same conversion action |
| What happens to it | Counted once | Not counted, and Google Ads shows an error message |
| Allowed characters | Letters, numbers and special characters such as dashes or spaces | Letters, numbers, dashes or spaces, up to 64 characters |
| Not covered | — | View-through conversions |
Both help centers say the ID must not carry anything that identifies a customer, such as an email address.
Three ways a transaction ID undercounts
An empty ID. GA4 groups every purchase that arrives with a blank transaction_id and deduplicates them together. If your tag sends an empty string when the order number is missing, many distinct orders collapse into one. Fix the confirmation page so the real order number is always there before the event fires.
A fixed ID. A tag that sends a hard-coded value, or a template placeholder that never resolved, gives every order the same ID. Google warns that this can significantly undercount key events in GA4, and in Google Ads only the first conversion with that value is processed. Google Ads lists other values it treats as invalid: placeholder words such as "thank_you" or "not set", full URLs, email addresses, prices, currency codes and phone numbers.
A Google-assigned ID. When your Google Ads tag sends no ID of its own, Google may fill in a temporary one that starts with GG_. Treat those as blank: they cannot be used for conversion adjustments, and they do not clear the "missing transaction ID" diagnostic.
Where duplicates still get through
Deduplication in Google Ads stays inside one conversion action. If the website tag records a purchase in one action and a server upload records the same order in a second action, both conversions are kept, because no single action saw the ID twice. Decide which action is the one you count, and see primary and secondary actions for how that choice reaches the Conversions column.
When the same conversion action receives data from more than one source, such as the tag plus an upload through Data Manager or offline conversion import, the uploaded ID has to equal the tag's transaction_id character for character. A prefix like web-, a suffix, or a trailing space on one side is enough to stop the match, and the order is counted twice. Data Manager requires the ID for additional data sources; Offline Conversion Import treats it as optional but recommended for purchases.
A transaction ID also does nothing for view-through conversions in Google Ads, and it is a different control from the Count setting: the ID removes a repeat of one purchase, such as a reloaded confirmation page, while "One" counts at most one conversion per ad click. See Count: one vs every.
How to check your tag
- Place a test order, then open the confirmation page source and confirm the order number replaced the server expression in the purchase snippet.
- In Google Tag Manager Preview mode or Tag Assistant, check that the ID is not static, not "undefined", and changes with each test purchase.
- In Chrome DevTools, the Google Ads conversion request carries the ID in its
oidparameter. - Some store platforms send the ID for you; Google names Shopify as one.
Spotting an undercount in your own data
etlmcp cannot repair duplicates or merged orders. The GA4 connector reads daily totals by date, campaign and source / medium, with no transaction ID dimension, so what it stores is GA4's count after deduplication. GA4's transactions metric lands in extra.orders and purchaseRevenue in extra.revenue. The Shopify connector stores the store's own count in extra.orders: orders placed that day, without test and cancelled orders. Google Ads conversions land in conversions, copied from metrics.conversions. Field lists are on the GA4 connector and the Shopify connector pages.
Compare the two order counts by day. A GA4 count far below Shopify's points at an empty or fixed transaction ID; a GA4 count well above it suggests the same order is reaching GA4 more than once. In PostgreSQL, the extra columns keep their dotted names, so quote them. With a GA4 pipeline loading ga4_daily and a Shopify pipeline loading shopify_daily:
WITH ga4 AS (
SELECT date, sum("extra.orders"::numeric) AS ga4_orders
FROM ga4_daily
GROUP BY date
), shop AS (
SELECT date, sum("extra.orders"::numeric) AS shopify_orders
FROM shopify_daily
GROUP BY date
)
SELECT date, shop.shopify_orders, ga4.ga4_orders,
round(ga4.ga4_orders / nullif(shop.shopify_orders, 0), 2) AS ratio
FROM shop
LEFT JOIN ga4 USING (date)
ORDER BY date DESC;
A ratio that drops sharply on one day usually marks a site release that broke the ID. Fixing the tag only changes purchases sent after the fix. Each routine GA4 sync re-pulls the last 13 days, so recent days update as GA4 restates them. For more causes of a gap, work through the discrepancy checklist.