Skip to content

Statistics in Tobira #1155

Open
Open
@LukasKalbertodt

Description

@LukasKalbertodt

Users of Tobira should be able to see some statistics about their events, pages, ... in Tobira. The most basic one would be a video "click" counter. This is a very general issue describing all the ways one could approach that.

With #1099, it is possible to let the Paella player send usage statistics to a Matomo server. As described in #1038, this is not the full solution, as that data is only stored in Matamo, not displayed in Tobira itself.

Where to store the statistical data?

Matomo

The collection would work as it does with the Paella plugin now: matomo.js would be loaded from the Matomo server, and events would be emitted, which are sent to the same server.

Advantages:

  • Central (can aggregate view counts for a video from Tobira, LMS, etc for example)
  • Is optimized for storing this kind of data & has built-in UI tools to show & analyze the data

Disadvantages:

  • Data collection can be blocked rather easily by the browser or plugins (my browser does block Matomo, for example)
  • Tobira would have to retrieve the data from Matomo, adding a new communication link, which complicates the architecture of Tobira, making the whole system potentially harder to set up and more brittle.

Tobira

Tobira would just use its own API to let the frontend send certain events and statistics.

Advantages:

  • Data collection very unlikely to get blocked -> better data.
  • No reliance on another external system.
  • There is some Tobira-specific data (e.g. page views), so Tobira likely wants to store some statistics itself anyway. Technically, they could also be ingested into Matomo, but that seems a bit weird to me.

Disadvantages:

  • Is not central, i.e. video views through an LMS are not counted.
  • Incurrs some implementation work that we would get for free in Matomo, e.g. figuring out how to best store such data or how to protect against bad actors (e.g. adding a million views to a video)

Opencast

Opencast could get APIs to send events to (similar to Matomo). And/or Opencast could just check incoming HTTP requests for certain files, and trace them back to an event.

Advantages:

  • Central (can aggregate view counts for a video from Tobira, LMS, etc for example)
  • Data collection very unlikely to get blocked -> better data.
  • Tobira would only need to fetch statistical data from Opencast, where a communication channel already exists, meaning the system architecture does not change.

Disadvantages:

  • Incurrs some implementation work that we would get for free in Matomo. (See same point in Tobira section above)
  • Implementing that requires discussions in the OC community, i.e. this would be lots slower than just implementing what we need in Tobira.

As you can see, this is not a simple choice.

I personally tend towards not relying on Matomo to not make the architecture more involved. But I can totally understand the requirement to also show video views that happened in an LMS. And I'm not entirely sure how difficult implementing all of this would be, especially the protection against bad actors.

A mix of these options is certainly possible. For example, we could task Opencast with only gathering basic statistics about videos, while Tobira collects most other data itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:new-featureA new featureneeds:decisionNeeds a decision of some kind (discussion thread)needs:researchNeeds research as we are lacking knowledge to make an informed decision

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions