hello@newnorth.nl+31 (0) 85 401 31 62
/Journal

Eliminating duplicate Google Ads conversions with GTM

GuideTracking2023.10.15
Freek Kampen
Freek KampenCo-founder, New North Digital

Double counting makes campaigns look better than they are. Where duplicates come from, and how to block them on transaction ID.

Why double counting hurts

A conversion counted twice isn't just a dirty number. It carries through into everything you decide next.

What goes wrong

  • Your data stops being true, and your team believes it's performing better than it is.
  • You allocate budget on inflated figures, putting money into channels that haven't earned it.
  • You pay for advertising based on conversion data that's wrong. That costs money directly.

Where they come from

  • Visitor behaviour: someone refreshes the thank-you page or returns to it later, and the tag fires again.
  • Technical hiccups: a slow connection or browser issue leads people to resubmit a form or order.
  • Tagging mistakes: duplicate or redundant tags writing the same event twice.

The fix: block on transaction ID

In GTM you can shut this down with Simo Ahava's Transaction ID logger. It stores the transaction ID in a cookie or localStorage under the key __tid_gtm.

On the next purchase event you compare the transaction ID against what's in that cookie. If they match, you block the tag. The duplicate is stopped before it exists.

The setup, step by step

  • Get the tag template from the Community Template Gallery.
  • Attach it to your purchase trigger so the transaction ID lands in the cookie.
  • Create a first-party cookie variable with the value __tid_gtm.
  • Feed that cookie variable into a regex table variable.
  • Add a row with the transaction ID as the pattern and true as the output.
  • Create a custom event trigger using regex .* so it matches any event name.
  • Let that trigger fire only when the regex table returns true.
  • Finally, use it as a blocking trigger on your purchase events.

Test before you go live

This intervenes in your purchase measurement, so test the whole chain before rolling it out widely. One misplaced blocking trigger and you measure no conversions at all.

Want to talk about this?

Let's talk data.

Tell us about your stack, your goals, the data you wish you had.

Takes 1 minute