# How to work with HTML5 Videos

**URL:** <https://community.piwik.pro/t/how-to-work-with-html5-videos/3115>\
**Category:** Data collection and tags\
**Created:** [October 28, 2023, 1:17pm UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115 "2023-10-28T13:17:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![simom](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/simom/32/2545_2.png) [@simom](https://community.piwik.pro/u/simom)\
**Post date:** [October 28, 2023, 1:17pm UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/1 "2023-10-28T13:17:02Z")

</div>

Hello everyone,  
I have implemented HTML5 video tracking using this guide =\> [HTML5 video tracking tag | Piwik PRO help center](https://help.piwik.pro/support/tag-manager/html5-video-tracking-tag/). However, it seems that it is not working. I have tried using the debug mode and publishing everything. The video on the page is a simple `video` tag with a `source` (similar to this example: [HTML Video](https://www.w3schools.com/html/html5_video.asp)). Is there a specific markup or data attributes that need to be used? I have also attempted to track a specific class name, but with no success.

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [October 30, 2023, 11:15am UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/2 "2023-10-30T11:15:39Z")

</div>

Hi @simom!

Could you send me the URL address of your website and a screenshot of how your video tracking tag is set up? It can be either here or in a private message.

---

<div class="post-metadata">

**Author:** ![simom](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/simom/32/2545_2.png) [@simom](https://community.piwik.pro/u/simom)\
**Post date:** [October 30, 2023, 11:36am UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/3 "2023-10-30T11:36:05Z")

</div>

Hi Anthony,  
thanks for the reply, I’ve followed exactly this guide =\> [HTML5 video tracking tag | Piwik PRO help center](https://help.piwik.pro/support/tag-manager/html5-video-tracking-tag/) tracking all the page views and then I’ve added a new trigger on a specific class name

 ![Screenshot 2023-10-30 alle 12.31.49](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/1/15cb1f0cad50b6eafaa13dc5d18043279bc712b7.png)  
What I’ve noticed is that on debug mode using chrome (with no extensions active, incognito mode and consent accepted) I’ve always this DNT on the event, I’ve tried on Safari and everything is working properly  
 ![Screenshot 2023-10-30 alle 12.33.00](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/8/85352951fe621e868fd51067572b4f20088ab82b.png)  
The url is [https://docs.advancedcolumns.com/](https://docs.advancedcolumns.com/) is a 11ty site with barba.js, but I don’t know if this is relevant.  
Best,  
Simone

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [October 30, 2023, 11:45am UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/4 "2023-10-30T11:45:06Z")

</div>

> and then I’ve added a new trigger on a specific class name

The page view trigger should be enough as the video is detected automatically.

> What I’ve noticed is that on debug mode using chrome (with no extensions active, incognito mode and consent accepted) I’ve always this DNT on the event, I’ve tried on Safari and everything is working properly

I’m not a Google Chrome user but it could be that the incognito mode has the Do Not Track mode enabled by default. You can probably switch this off somewere in the Chrome settings or you can disable `Respect opt-out and DNT` in the tag (wouldn’t recommend it tho).

I have checked your instance and it seems that you are already collecting some video analytics data 🙂 (Analytics \> Reports \> Video analytics).

---

<div class="post-metadata">

**Author:** ![simom](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/simom/32/2545_2.png) [@simom](https://community.piwik.pro/u/simom)\
**Post date:** [October 30, 2023, 12:05pm UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/5 "2023-10-30T12:05:44Z")

</div>

Hi Anthony,  
Yes, it’s working now. However, because I switched to Safari to trigger the events, I also tested it on Chrome in regular mode, but I got the same result. I’m not sure why. I’ve also added the click event on the video to make sure it’s being tracked, but it’s probably not necessary for the progress event.

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [October 30, 2023, 12:07pm UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/6 "2023-10-30T12:07:13Z")

</div>

@simom this is probably the setting you are looking for:

> **[Turn "Do Not Track" on or off - Computer - Google Chrome Help](https://support.google.com/chrome/answer/2790761?hl=en&co=GENIE.Platform%3DDesktop)**
>
> When you browse the web on computers or Android devices, you can send a request to websites not to collect or track your browsing data. It's turned off by default. However, what happens to your

---

<div class="post-metadata">

**Author:** ![simom](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/simom/32/2545_2.png) [@simom](https://community.piwik.pro/u/simom)\
**Post date:** [October 30, 2023, 1:08pm UTC](https://community.piwik.pro/t/how-to-work-with-html5-videos/3115/7 "2023-10-30T13:08:27Z")

</div>

You are right! Thank you for your help!
