Piwik PRO tag

Tag Manager

After adding a new site or app to Piwik PRO, you’ll see the Piwik PRO tag in Tag Manager. This tag is responsible for collecting data from your site or app. By editing it you can change the way the tracker collects your data.

To make changes in the Piwik PRO tag, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. On the left, click Piwik PRO.
  4. In Basic tracking setup, you’ll see: Site or app ID, Site or app address, JavaScript library address and Tracker address.
    Tracking code setup in Piwik PRO
  5. In Data collection, you can set the following elements:
    Tracking code setup in Piwik PRO
    • Set a user ID: If turned on, you’ll recognize visitors by their user ID. A user ID can be a visitor’s email, username or some other unique identifier. We store IDs under the dimension called user ID. You can use this dimension in custom reports, segments and filters. Read more
    • Outlinks and downloads: If turned on, you’ll count outlinks and downloads. Outlinks are links that take the visitor outside your website. Downloads are links to all kind of files on your website. You’ll see collected data under Analytics > Reports > Outlinks or Analytics > Reports > Downloads.
    • Interactions with popups and content: If turned on, you’ll count times when people see and interact with your popup or content. Impressions and interactions are counted for: (1) popups added under Tag Manager > Tags > Add new tag > Custom popup, (2) content added under Tag Manager > Tags > Add new tag > Custom content, (3) any page content you tag in your website’s code. You’ll see collected data under Analytics > Reports > Content performance. Read more
    • Count session time precisely: If turned on, you’ll measure the end of a session more accurately. Session time is the period between opening the first page and closing the last one, but it’s hard to know exactly when a visitor closes the last page. This option will send ping requests to check if a visitor is still on the last page.
    • Recognize a visitor across domains: If turned on, the visitor who goes from one website to the other will be recognized as the same visitor. Sessions that would be treated as separate for each website, will be treated as one session. This option works only for domains that use the same tracking code and are added under Administration > Websites & apps > URLs. We add the pk_vid parameter to the page URL to pass the visitor ID between domains. Read more
    • Recognize a visitor across subdomains: If turned on, the visitor who goes from one subdomain to the other will be recognized as the same visitor. Sessions that would be treated as separate for each subdomain, will be treated as one session. This option works only for subdomains that use the same tracking code. You need to pick a domain where you’ll store a cookie with the visitor ID. Read more
  6. In Collect data for custom dimensions, you can set up which data is collected as custom dimensions.
    Tracking code setup in Piwik PRO

    Note: Before you set up this data collection, create custom dimensions under Analytics > Settings > Custom dimensions. Read more

  7. In Privacy, you can set the following elements:
    Tracking code setup in Piwik PRO
    • Use visitor cookies: If turned off, you won’t set visitor cookies like _pk_id.* and _pk_ses.* that are responsible for recognizing visitors and their sessions.
    • Use secure cookies: If turned on, you’ll receive information from first-party cookies over a secure connection. Only websites with the HTTPS protocol will be able to access these cookies.
    • Remove the visitor cookie at custom time: The visitor cookie (_pk_id.*) is removed after 13 months by default. You can delete it at a different time.
    • Remove the session cookie at custom time: The session cookie (_pk_ses.*) is removed after 30 minutes by default. You can delete it at a different time.
    • Consent type: Set the consent type you want to use to fire this tag. This setting works only when you use a consent form on your site. The form is turned on or off under Administration > Websites & apps > Ask visitors for consent.
    • Respect visitor privacy: If turned on, this tag won’t fire for visitors who set Do-Not-Track in their browsers, or for visitors who opt out of tracking using our opt-out form.
  8. In UX issues, you can set the following elements:
    Tracking code setup in Piwik PRO
    • Detect JavaScript errors: If turned on, you’ll record all kinds of JavaScript errors on your website. The errors will be saved as custom events with the error type and the URL of the page where they occurred. You’ll see them under Analytics > Reports > Custom events or if you create a custom report.
  9. In Other options, you can set up the following elements:
    Tracking code setup in Piwik PRO
    • Track page views manually: If turned on, you can use a virtual page view tag or custom JavaScript code to track page views manually.
    • Don’t fire in debug mode: If turned on, this tag won’t fire in debug mode, but will still fire on your site or app.
  10. In Flight dates, you can set the date and time when the tag is fired.
  11. In Tag triggers, you can change triggers for this tag.

    Note: Be careful with changing flight dates and triggers for this tag because it greatly influences your data collection.

  12. When you’re done, click Save.
  13. Test your tag in debug mode.
  14. When you’re happy how the tag works, click Publish.

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