How tag sequencing works
Open any tag in Google Tag Manager, look in its advanced settings, and you can nominate two companions: a setup tag that runs before it, and a cleanup tag that runs after it. The three then behave as one unit. The setup tag fires first and is allowed to finish, the main tag fires next, and the cleanup tag follows.
There is one option worth understanding. You can tell Tag Manager not to fire the main tag if the setup tag fails, which turns a loose ordering into a genuine dependency. Without it, a broken setup tag lets the main tag run anyway, on whatever incomplete information happens to be available.
Why it matters
Some tags need something to exist before they can do their job. A conversion tag that reads a value assembled by a small script needs that script to have run. A vendor tag that depends on a library needs the library loaded. Without sequencing, the browser fires everything attached to the same event at roughly the same moment and the order is not something you can rely on.
The symptom of getting this wrong is quietly misleading rather than obviously broken: conversions that record with a missing value, events that arrive without the details that made them useful, or figures that are correct on a fast connection and wrong on a slow one. That last case matters on mobile networks, where the gap between two tags is wider than it looks on an office connection.
Where tag sequencing goes wrong
The first trap is a setup tag that also has its own firing trigger. It will then fire twice on the same page — once on its own trigger, once as part of the sequence — and if it is anything that counts, you have just doubled it. Setup tags are usually best left with no trigger of their own.
The second is chaining. A sequence of several tags, each depending on the last, is very hard to reason about and worse to debug months later. And sequencing is often used to paper over a timing problem that should be fixed at source: if a value is not ready when the tag needs it, the durable answer is for the site to announce it properly rather than for Tag Manager to wait and hope.
Getting it right
Use sequencing only for a real dependency, keep it to a pair, and switch on the option that stops the main tag when the setup tag fails — an absent conversion is easier to spot than a wrong one. Where the dependency is really about data, ask for the value to be pushed into the data layer before the event fires; that removes the need for sequencing altogether.
Do not confuse it with tag firing priority, which only decides the order in which tags start and never waits for one to finish. Verify every sequence in Preview mode on a slow connection as well as a fast one, because a race condition that never appears in the office will appear on somebody’s phone.
