GTM’s trigger system answers the question “when should this tag fire?” It does not answer “in what order should tags fire relative to each other?” or “what should happen before this tag fires?”

Tag sequencing and firing priority are the tools that answer those questions. They are underused, often misunderstood, and responsible for a category of subtle tracking bugs that are difficult to diagnose after the fact.

This post covers how both mechanisms work, the practical scenarios where they matter, and how to configure them correctly.


Why Order Matters in GTM

Multiple tags often fire on the same trigger. When the page loads, you might have:

If these all fire simultaneously, on the same trigger, with no order enforced, the behavior depends on browser execution timing and GTM internals. Most of the time, it works. In edge cases — especially on slow connections, with heavy pages, or when one tag depends on data another tag writes — it breaks silently.

The two specific bugs that tag ordering prevents:

  1. Conversion Linker fires after conversion tags. The GCLID needs to be stored in a cookie before any conversion tag tries to read it. If the Conversion Linker fires after a conversion tag on the same page load, the cookie does not exist yet when the conversion tag fires.

  2. Consent tag fires after data collection tags. If you are using a consent management platform and checking consent state before sending data, the consent check must complete before any tag that sends data fires.


Mechanism 1: Firing Priority

Every GTM tag has a firing priority setting. It is a number. Higher numbers fire first. The default is 0.

To set firing priority: open a tag, go to Advanced Settings, and set the Priority value.

Tags with the same priority fire in an undefined order. Tags with higher priority fire before tags with lower priority on the same trigger.

Practical priority settings to use:

PriorityTags
100Consent initialization, CMP integration tags
50Conversion Linker, Google tag base configuration
10GA4 Configuration tag, Google Ads Conversion Tracking base
0 (default)All event tags (purchases, form submissions, etc.)
-10Tags that depend on data written by other tags

This is simple and effective for most cases where you just need one category of tags to consistently run before another.

Firing priority does not guarantee that a tag has finished executing before the next one starts. For tags with asynchronous behavior, a higher priority only means they started loading first, not that they completed first.


Mechanism 2: Tag Sequencing

Tag sequencing is the stronger guarantee. It lets you specify:

To configure: open a tag, go to Advanced Settings, expand Tag Sequencing.

Setup Tag: The main tag fires only after the Setup Tag has fired. You can optionally require that the Setup Tag fired successfully (based on whether it returned without errors).

Cleanup Tag: The Cleanup Tag fires after the main tag, whether or not the main tag succeeded.


Use Case 1: Ensuring Conversion Linker Always Fires First

This is the most common and important sequencing use case.

The problem: Your thank-you page fires a Google Ads Conversion tag and a GA4 Purchase event. The Conversion Linker also fires on All Pages. On most page loads the Conversion Linker happens to fire first, but on slow connections or when the page is cached, the conversion tags occasionally fire before the Conversion Linker has stored the GCLID cookie.

The fix: Set the Conversion Linker as the Setup Tag for every conversion tag.

Configuration:

  1. Open your Google Ads Conversion tag.
  2. Advanced Settings > Tag Sequencing.
  3. Setup Tag: select your Conversion Linker tag.
  4. Check “Don’t fire [tag] if [setup tag] fails to fire.”

Repeat for every conversion tag in the container.

Now the conversion tag will not fire until after the Conversion Linker has executed. The GCLID is in the cookie before the conversion tag looks for it.

One important note: this means the Conversion Linker fires once via the All Pages trigger, and again as a Setup Tag before each conversion tag. The Conversion Linker is idempotent (it just reads the URL and writes a cookie), so firing it twice is harmless.


You have a consent management platform. You have a custom tag that checks whether the user has accepted analytics cookies. No analytics tags should fire until this check has been confirmed.

Setup:

  1. Create a Custom HTML tag named “Consent Check” that reads your CMP’s consent state and returns cleanly if consent is granted, or throws an error if it is not.
<script>
(function() {
  // Example: Cookiebot
  if (typeof Cookiebot === 'undefined' || !Cookiebot.consent.statistics) {
    throw new Error('Statistics consent not granted');
  }
})();
</script>
  1. Set this “Consent Check” tag as the Setup Tag for your GA4 Configuration tag.
  2. Enable “Don’t fire [GA4 Config] if [Consent Check] fails to fire.”

If consent is not granted, the Consent Check tag throws an error, GTM marks it as failed, and the GA4 Configuration tag does not fire.

This is a belt-and-suspenders approach alongside Google Consent Mode. It is especially useful when you need strict control and cannot rely purely on Consent Mode’s modeled behavior.


Use Case 3: Chaining Dependent Tags

You have a Custom HTML tag that initializes a global JavaScript object that subsequent tags rely on. If the initialization tag has not run, the subsequent tags error out.

Example: you have a tag that builds a window.trackingContext object with user data, and your GA4 tags read from that object.

Setup:

  1. Tag A: “Initialize Tracking Context” - Custom HTML that builds window.trackingContext.
  2. Tag B: “GA4 - Enhanced Purchase” - reads window.trackingContext.userId.

Set Tag A as the Setup Tag for Tag B. Tag B will not fire until Tag A has run.

For cases where you have many tags that all depend on the same initializer, use firing priority instead: give Tag A a priority of 50, leave all dependent tags at 0. The initializer runs first, then all dependent tags run.


Use Case 4: Cleanup After Tag Execution

Cleanup Tags run after the main tag, regardless of success. Use cases:

Example: after a purchase tag fires, a Cleanup Tag pushes an ecommerce: null reset to the data layer so the purchase data does not persist into the next virtual pageview.

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ ecommerce: null });
</script>

Configure this as the Cleanup Tag on your GA4 Purchase event tag.


Combining Priority and Sequencing

Priority and sequencing are complementary tools, not alternatives.

Use firing priority when:

Use tag sequencing when:

A practical setup for a typical e-commerce GTM container:


What Tag Sequencing Does Not Do

Tag sequencing does not make tags wait for asynchronous operations in the setup tag to complete. If your Setup Tag makes an API call and you need the result before the main tag fires, sequencing does not help — GTM fires the main tag after the Setup Tag script has executed, not after any promises or callbacks inside it resolve.

For async dependencies, the pattern is: the async operation completes, pushes a custom event to the data layer, and that event triggers the main tag. No sequencing needed; the trigger handles the timing.


Diagnosing Tag Order Issues in GTM Preview

In GTM Preview mode, each event in the left panel shows all the tags that fired. The order in the list reflects the order they fired.

To verify your sequencing is working:

  1. Enable Preview.
  2. Trigger the event (page load, purchase, etc.).
  3. In the Preview panel, select the event and go to Tags.
  4. Look at the “Fired” tags list. Tags are listed in the order they fired.
  5. Confirm your high-priority tags and setup tags appear before their dependents.

If a tag shows as “Not Fired” when you expected it to fire, check whether its Setup Tag fired successfully. A Setup Tag that threw an error will prevent the dependent tag from firing.


Key Takeaway

Tag sequencing and firing priority are the controls that give you deterministic behavior in a container where multiple tags fire on the same trigger. Without them, tag firing order is unpredictable and dependent on network timing and browser behavior. With them, you have explicit guarantees: the Conversion Linker runs before conversion tags, consent is verified before data is sent, and initialization logic runs before anything that depends on it.

For any GTM container managing conversion tracking, set the Conversion Linker as a Setup Tag on all conversion tags. This is the single highest-impact configuration change you can make for attribution reliability.

Up next in the GTM Expert Series: How to Scrape and Use DOM Data in GTM Without a Developer

Related Posts

Element Visibility Trigger Not Firing on Elementor Form Success: A GTM Troubleshooting Guide

GTMGoogle Tag ManagerElementorWordPressGTM Expert Series

Tracking a Next.js SPA in GTM: History Navigation, Invisible Carts, and Full E-Commerce Setup

GTMGoogle Tag ManagerGA4Google AdsGTM Expert Series

When Preview Mode Lies: Runtime-Level HTTP Logging for Server-Side GTM

GTMGoogle Tag ManagerServer-Side GTMGTM Expert Series
Adnan Agic

Adnan Agic

Google Ads Strategist & Technical Marketing Expert with 5+ years experience managing $10M+ in ad spend across 100+ accounts.

Need Help With Your Google Ads?

I help e-commerce brands scale profitably with data-driven PPC strategies.

Get In Touch
Back to Blog