sualko / cloud_piwik

Track @Nextcloud users with @matomo-org (formerly Piwik)
http://sualko.github.io/cloud_piwik/
MIT License
37 stars 18 forks source link

Is it possible to track media plays? #82

Closed mechanimal82 closed 3 years ago

mechanimal82 commented 3 years ago

Really sorry, this isn't a bug - but I'm wondering if anyone knows of a way to track media (specifically video) plays on Nextcloud?

I've just managed to set this up, being non-technical it took some effort - so chuffed with myself there! What I'm looking for is to be able to monitor and count the number of plays of video's stored in my nextcloud. I need this as the video's contain licensed material and I need to provide the Music Licensing Company a count of plays of the files so they can pay the correct royalties.

This isn't something it seems you can do in Nextcloud directly, so I was hoping to do it using Matomo... Do you know if this would be possible, and any suggestions as to how?

I know this isn't the best place/way to ask. But would really appreciate any help you can give!

Thanks

sualko commented 3 years ago

Tracking such kind of stuff is tricky, because you have to make sure that it is not easily preventable. For example someone could disable javascript, download the file once and view it multiple times and so on. If this is no concern for you, you can watch for start/stop events on the video element. If you can't implement that by your own, you can also purchase the media analytics plugin from Matomo.

mechanimal82 commented 3 years ago

Hi, OK... so that's a step too far for me (Sooo confused). I've added the media analytics plugin on a trial to see if that helps, but that's not recording any plays. According to the docs it should 'just track' without any configuration. Is there something in this code which needs adding so that media plays can be tracked?

sualko commented 3 years ago

I'm not familiar with that plugin and it's a bit out of scope for this app. If you need some paid consulting, please write a mail to klaus@jsxc.org.