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.
Before you start
Here are some things to know, before you begin sorting tags:
- By default, tags are fired in an unspecified order.
- Prioritized tags fire from top to bottom of the list and before 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 which tags you want to work with: Async tags or Sync 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.