Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video views stats #262

Closed
tcitworld opened this issue Jan 29, 2018 · 7 comments
Closed

Video views stats #262

tcitworld opened this issue Jan 29, 2018 · 7 comments

Comments

@tcitworld
Copy link
Collaborator

We currently only have the number of views for a video. Saving the date when the view occurred (for instance like we do for likes inside accountVideoRate) would allow :

  • the uploader to view a graph of his/her video views in function of time
  • the instance to provide "real trending" videos, not just popular ones.
@Chocobozzz
Copy link
Owner

Chocobozzz commented Jan 29, 2018

I don't think it's a good idea to directly store views in the database (size/writes).

What we could do however is:

  • Buffering views in Redis
  • Doing sums of the views and write them periodically in the database

I imagine a table with this type of row:

id, videoId, views, startDate,            endDate
1,  45,      4548,  2018-01-29T14:00:00Z, 2018-01-29T15:00:00Z

@tcitworld
Copy link
Collaborator Author

Yeah, should have added that, sorry.

@Chocobozzz
Copy link
Owner

First step (storing views by dates) implemented: 9a629c6

@Chocobozzz Chocobozzz added the Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development label Dec 13, 2018
@LoveIsGrief
Copy link
Contributor

Does this mean that a plugin can now be written to implement this?

@Chocobozzz
Copy link
Owner

No not yet, the label means that we have to add features to the plugin API so we can create this kind of plugin

@rigelk
Copy link
Collaborator

rigelk commented Mar 26, 2020

View stats could store additional metadata, some of which we could take from https://support.google.com/youtube/answer/9314414?hl=en (YouTube support doc). For instance: view time in a video in minutes, how the user reached a video ("organic" if from within the interface, "external" if directly from a link posted outside, "embed" if from an embeded player).

Some more detailed stats could be interesting form the uploader's PoV, under "audience retention" stats. They consist in just reporting more precisely what parts of the video got watched, and not just the time watched.

@Chocobozzz Chocobozzz removed the Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development label Mar 16, 2022
@Chocobozzz
Copy link
Owner

Implemented in #4900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants