Chat with us, powered by LiveChat

The Difference between Google Tag Manager’s Tag Firing Priority and Tag Sequencing

The difference between Google Tag Manager’s “tag firing priority” and “tag sequencing” is subtle but important.

Tag Sequencing

Tag sequencing allows you to require that a tag fire immediately before or immediately after the tag you’re editing.

Let’s say you’re editing a tag which you’ve named “Middle Tag”.

Suppose there’s another tag called “Setup Tag” you need to load before your “Middle Tag” is fired. To make this happen, you’d check the box for “Fire a tag before Middle Tag fires.” If “Setup Tag” should happen to fail, do you still want to fire your “Middle Tag”? If not, check the box for “Don’t fire Middle Tag if Setup Tag fails.”

Now let’s suppose that you’ve got another tag that you want to fire immediately after “Middle Tag” loads. We’ll call this tag “Cleanup”. On your Middle Tag configuration, check the box “Fire a tag after Middle Tag fires.” Select “Middle Tag”. If “Middle Tag” should happen to fail, do you still want to fire your “Cleanup” tag? If not, check the box for “Don’t fire Cleanup if Middle Tag fails.”

Tag Firing Priority

Tag firing priority specifies the order in which all tags should begin to fire. Tags with a higher numbered priority begin to fire first. However, all tags are still fired asynchronously, i.e. a higher priority tag need not finish firing before another tag begins to fire.

So, if you need a certain tag to be fully loaded before another tag is fired (e.g. if the second tag depends on the first), you need to use tag sequencing. You wouldn’t use tag firing priority because, even though you might tell Tag Manager to begin loading your second tag after your first tag, your second tag could still finish loading before the first one fully loads.

A Note about Triggers in Tag Sequencing

In Tag Sequencing, the setup and cleanup tags always fire if the main “middle” is triggered by its triggers and, when required for the cleanup tag, the “middle” tag successfully loads. In other words, any triggers that you may have applied to the “setup” and “cleanup” tags are not applicable. The only condition for firing the setup and cleanup tags is whether or not the middle tag fires.

Related Posts

Leave a Reply