HTML5 video tracking tag

Tag Manager

Available from 16.5.0

Note: For versions below 16.5.0, use a custom code for HTML video tracking.

The HTML5 video tracking tag helps you collect data about interactions with videos on your site or app. After setting up this tag, you can see collected data in video analytics reports.

To create and set up the HTML5 video tracking tag, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. Click Add new tag.
  4. Name the tag and select the following type: HTML5 video tracking.
  5. Click Next.
  6. Set up the following elements:
    • Track progress: If turned on, you’ll track percentage thresholds and interaction timestamps.
    • Track only videos with the selected CSS selectors: If turned on, you’ll track only videos that have the listed CSS selectors.
    • Read video titles from an HTML attribute: If turned on, you’ll use an HTML attribute to record titles for tracked videos.
    • Track the volume level as a custom dimension: If turned on, you’ll track the volume level as a percentage. It will be stored as a custom dimension.

    Note: If you track the volume level as a custom dimension, create a custom dimension under Analytics > Settings > Custom dimension and enter the dimension ID here.

    HTML5 video tracking tag 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.
  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.
  9. In Flight dates, set the date and time when the tag is fired.
  10. In Tag triggers, click Choose existing trigger.
  11. Choose the following trigger: All page views.

    Note: You can also set a new trigger that will fire this tag on selected pages.

  12. When you’re done, click OK for the trigger.
  13. Click Save for the tag.
  14. Test your tag in debug mode.
  15. When you’re happy how the tag works, click Publish.
  16. After some time, data will be collected and you will be able to see it under Menu > Analytics > Reports > Video analytics.
    Video analytics report in Piwik PRO

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