Create a tag

Tag Manager

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

Video tutorial: watch on YouTube

A tag is a piece of code that you can place in your site’s code using Tag Manager. With tags you can make changes on your site on your own. No need to engage web developers in that process.

You can use tags to collect additional data, run marketing campaigns, integrate products or add any kind of code. In this article, we’ll explain how to create a tag.

To create a tag, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. Click Add new tag.
  4. Name the tag and choose a tag type. You can choose a tag type from two categories:
    • Async tags: They don’t interfere with loading page content. The browser can load all tags at the same time and it doesn’t wait for a certain tag to load completely before moving to the next one. Async tags load faster than sync tags and are better for collecting data. Most of tags in Piwik PRO are async tags.
    • Sync tags: They load before the page content loads. They also wait for the tag content to load before moving on to the next content. Sync tags are often used to run A/B tests.

    Tip: Each tag type is described in this section.

  5. Click Next.
  6. Set up the tag. For example, in a custom event tag add: CategoryActionName.
    Create a tag in Tag Manager in Piwik PRO
  7. In Advanced tag settings, choose Consent type. Set it up if you use Consent Manager. The tag will fire only when selected consent is given by a visitor.
    Create a tag in Tag Manager in Piwik PRO

    Tip: To fire a tag without consent, you can select the following type: Does not require consent.

  8. Respect visitor privacy is turned on by default. Leave it as is, if you want to respect visitors who set a Do-Not-Track option in their browser or opted out from tracking.
    Create a tag in Tag Manager in Piwik PRO
  9. The tag will fire in a debug mode by default but you can change it. Toggle Don’t fire in debug mode.
    Create a tag in Tag Manager in Piwik PRO
  10. In Flight dates, set the date and time when the tag is fired.
    Create a tag in Tag Manager in Piwik PRO
  11. In Tag triggers, click Add new trigger or Choose existing trigger to set up a trigger for your tag.
    Create a tag in Tag Manager in Piwik PRO

    Tip: You can add a trigger to a tag at any time, but it’s a good practice to do it while creating a tag.

  12. If you’re setting up a new trigger, name the trigger.
  13. In Trigger type, choose a type. For example, Page view.
    Create a tag in Tag Manager in Piwik PRO

    Tip: Each trigger type is described in this section.

  14. Click Next.
  15. Set up additional trigger elements.
  16. In Event conditions, define conditions for the trigger. For example, Page URL contains contact.
    Create a tag in Tag Manager in Piwik PRO
  17. In Audiences, pick an audience for which you want to run the tag. For example, we’ve got an audience Apple product users and we want to run the tag only for visitors from this audience.
    Create a tag in Tag Manager in Piwik PRO

    Tip:  For more about audiences, read this article.

  18. In Multiplicity, set how often the tag should be fired. For example, Fire tag multiple times.
    Create a tag in Tag Manager in Piwik PRO
  19. When you’re done, click OK.
  20. Click Save for the tag.
  21. Test your tag in debug mode.
  22. When you’re happy how the tag works, click Publish.

    Tip: You can fire tags in a specific order by prioritizing them under Menu > Tag Manager > SettingsTag priority.

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center