Don't have one? Create one ↗
← All courses

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

  1. Trigger: Custom Event - Purchase Attempt

    Add a Custom Event trigger on purchase_attempt, name it Custom Event - Purchase Attempt and Save.
  2. Tag: a GA4 Event tag (or Custom HTML - Test)

    Add a tag (GA4 Event purchase, or the stand-in) firing on Custom Event - Purchase Attempt.
  3. Set Tag firing options to Once per event

    1. In the tag, open Advanced Settings → Tag firing options.
    2. Choose Once per event (or Once per page), then Save.
    3. For belt-and-braces, add a trigger condition so the same transaction_id can'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.

  1. In your GTM, click Preview.
  2. Paste the live URL above and click Connect.
  3. Interact with the live page and watch your tag fire in Tag Assistant.

What you should expect to see

The timeline shows 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

0 of 11 lessons complete