/Journal

Matching Google Ads conversions to real orders with a transaction ID custom variable

GuideAttributie2026.11.04
Freek Kampen
Freek KampenCo-founder, New North Digital

Google Ads won't tell you which orders sit behind a campaign's conversions. A custom variable with the order ID will, if you send it from your server container.

The question Google Ads can't answer

Say Google Ads reports 140 purchases last month and the shop only recognises 120 of them. Which ones are real? In GA4 you'd export the transaction IDs and match them against the shop. Google Ads has no such export. You get a count per campaign, and that's it.

A custom variable fixes that. You send the order ID along with every conversion, and Google Ads lets you segment conversions by it. Then you can line up a campaign's conversions against your order list, one by one.

Why it has to go through the server container

With gtag.js on the page you can add any parameter to the conversion event and it shows up as a custom variable. In web GTM you can't: the Google Ads Conversion Tracking tag only has fields for value, transaction ID and currency. There is no field for a custom variable.

Server-side GTM gets around it. The server's Google Ads Remarketing tag does take custom variables, and it sits next to your conversion tag anyway.

The setup

  1. Add the order ID to the GA4 purchase event that goes to your server container, under its own name such as order_id.
  2. Check that the server container has a Google Ads Conversion Tracking tag for the purchase and a Google Ads Remarketing tag.
  3. In the Remarketing tag, add order_id from the event data as a custom variable.
  4. In Google Ads, go to Goals, Conversions, Custom variable. The variable appears there as "Activation needed". Activate it.

Data shows up within a few hours, but give it a day or two. Only conversions after activation get a value. Google will warn that it detected an "event level key": too few events per value. For an order ID that's exactly the point, so you can ignore it.

Reading the result, and its limits

In the campaign view, choose Segment, Conversions, Custom variable. It works on Conversions and All conversions, not on rates like conversion rate.

You'll see some (not set). There are three usual reasons. The variable sits on a different conversion action than the primary one you're looking at. The variable stopped arriving, which the "last received" time in Google Ads shows. And even with a correct setup we've seen up to a quarter of conversions without a value, most likely because of consent.

Google Ads records at most 100,000 values per variable, so a busy shop needs a fresh variable now and then. And never send personal data like an email address this way.

Step-by-step screenshots are in the newmetrics.io version of this guide.

Want to talk about this?

Do your numbers add up?

One call is usually enough to see where it breaks.

Takes 1 minute