Notification

G Suite is now Google Workspace: everything your business needs to get work done.

Tag sequencing

Specify tags to fire immediately before or after a given tag on web containers.

Tag sequencing enables you to specify tags to fire immediately before or after a given "primary" tag is fired. This setting is available in web containers, and may be applied to any tag configuration from Advanced Settings and then Tag Sequencing.

Setup: Load a tag before your tag fires

A setup tag fires before the primary tag. To configure a setup tag:

  1. Select the "Fire a setup tag before <this tag> fires" checkbox. Note: "<this tag>" will be replaced by the title of the current tag.
  2. Select the tag you wish to use from the menu.
  3. Optional: Select the "Don't fire <this tag> if <setup tag> fails" checkbox if you wish to have the main payload tag only fire when the setup tag fires successfully. " Note: "<setup tag>" will be replaced by the name of the tag selected in step 2.

Developers must use google_tag_manager[{{Container ID}}].dataLayer.set() to change data layer values from the setup tag. You need to use .set() instead of .push() because the .push() won’t get recognized by Google Tag Manager until the following event. Using .set will allow the event to be captured by the current event.

Cleanup: Load a tag after your tag fires

A cleanup tag fires immediately after the primary tag. To configure a cleanup tag:

  1. Select the "Fire a cleanup tag when <this tag> is finished" checkbox. Note: "<this tag>" will be replaced by the title of the current tag.
  2. Select the tag you wish to use from the menu.
  3. Optional: Select "Don't fire <cleanup tag> if <this tag> fails" if you wish to have the cleanup tag only fire when the primary tag fires successfully. Note: "<cleanup tag>" will be replaced by the name of the tag selected in step 2.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
18276352691473770763
true
Search Help Center
true
true
true