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 a 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 a consent form on your site. This tag will fire only for visitors who accept the selected consent type.
    Consent type in Piwik PRO

    Tip: No consent is required is the type you can use for tags that don’t collect data. For example, tags that add a popup or content, or tags that change the look of your site.

  8. Respect opt-out and DNT is turned on by default. Leave it as is, if you want to respect visitors who set Do-Not-Track in their browsers, or visitors who opt out of tracking using our opt-out form.
    Respect opt-out and DNT in Piwik PRO
  9. The tag will fire in a debug mode by default but you can change it. Turn on Don’t fire in debug mode.
    Don't fire in debug mode in Piwik PRO
  10. In Flight dates, set the date and time when the tag is fired.
    Flight dates in Piwik PRO
  11. In Tag triggers, click Add a trigger or Choose existing trigger to set up a trigger for your tag.
    Tag triggers 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 blog.
    Event conditions in Piwik PRO
  17. Available below 16.0.0 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, Many times during a session.
    Multiplicity 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