If you want to fully control the order in which tags fire on your website, you can set the priority and put them in a specific order. It is useful when you have related tags and one needs to run a script before the other one.
Here are some things to know, before you begin sorting tags:
- By default, tags are fired in an unspecified order.
- Prioritized tags fire before all other tags from top to bottom of the list. You can set an order by using the drag-and-drop.
- All synchronous tags fire before asynchronous 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 which tags you want to work with: Asynchronous tags or Synchronous tags.
- On the list with available tags, mark tags you want to prioritize.
- Click the arrow to add selected tags to the list with prioritized tags.
- In Prioritized tags, drag and drop tags to set them in a specific order.
- When you’re done, click Save.
- Optionally, test your tags in debug mode.
- When you’re happy how tags work, click Publish.