If you want to control the order in which tags run on your website, you can set their priority and put them in a specific order. This is handy when you have related tags and one needs to run a script before the other.
In this article, we’ll explain how to set a specific order for your tags.
Here are some things to know, before you begin:
- By default, tags fire in a random order.
- Tags with priority fire from top to bottom in the list and before the other tags.
- All sync tags fire before async tags.
To fire tags in a specific order, follow these steps:
- Go to Menu > Tag Manager.
- Navigate to Settings.
- On the left, click Tag priority.
- Choose the tag group you want to work with: Async tags or Sync tags.
- Select the tags you want to prioritize from the list of available tags.
- Move the selected tags to a list containing prioritized tags.
- In Prioritized tags, drag and drop tags to place them in a specific order.
- When you’re done, click Save.
- (Optional) Test your tags in debug mode.
- When you’re happy with how tags work, click Publish.
- All done!