Lesson 9 of 11
Tag Firing Options & Dedup
① Connect your GTM container
Paste your container ID to load it into this page. It only ever runs here.
Advanced: use a specific environment
Double-firing is one of the most expensive bugs in analytics: a conversion counted twice inflates revenue, ruins ROAS and can double-bill an ad platform. It usually comes from the same event landing in the dataLayer more than once, a framework re-render, a listener bound twice, a retried request.
GTM gives you two clean fixes. Tag firing options (Once per event, or Once per page) tell GTM to fire a tag at most once for a given event or page load. For true idempotency you can also gate on a unique key like transaction_id so the same id never counts twice.
The button below fires purchase_attempt twice for one click. Wire a conversion tag and make it record a single conversion.
Goal
Make a tag fire only once even when the same event is pushed twice.
Build it in GTM
Trigger: Custom Event - Purchase Attempt
Add a Custom Event trigger onpurchase_attempt, name itCustom Event - Purchase Attemptand Save.Tag: a GA4 Event tag (or Custom HTML - Test)
Add a tag (GA4 Eventpurchase, or the stand-in) firing onCustom Event - Purchase Attempt.Set Tag firing options to Once per event
- In the tag, open Advanced Settings → Tag firing options.
- Choose Once per event (or Once per page), then Save.
- For belt-and-braces, add a trigger condition so the same
transaction_idcan't fire twice.
Debug in Tag Assistant
Copy this lesson's live URL and paste it into GTM Preview, that is the page Tag Assistant connects to. It has the clickable elements, so this page stays clean for reading.
- In your GTM, click Preview.
- Paste the live URL above and click Connect.
- Interact with the live page and watch your tag fire in Tag Assistant.
What you should expect to see
purchase_attempt twice, but under Tags Fired your conversion tag appears once.Verify your container
Built it? Export your container, Admin → Export Container, choose your workspace, then drop the JSON here to check it against this lesson.
Drop your container .json here
or browse · checked in your browser, nothing is uploaded