Guides & support » Tags, triggers & variables » How to fire tags in a specific order

How to fire tags in a specific order

Needed permissions: owner, manage, edit & publish, edit

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.

Before you start

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:

1. Go to Menu > Tag Manager.

2. Navigate to Settings.

3. On the left, click Tag priority.

4. Select the tags you want to prioritize from the list of available tags.

tag priority in Piwik PRO

5. Move the selected tags to a list containing prioritized tags.

6. In Prioritized tags, drag and drop tags to place them in a specific order.

Prioritized tags in Piwik PRO

7. When you’re done, click Save.

8. (Optional) Test your tags in debug mode.

9. When you’re happy with how tags work, click Publish.

10. All done!