Skip to main content
Version: v2.10

Matomo

To collect statistical data about Tobira usage, you can use Matomo. Tobira's Matomo integration is still very basic and currently only allows you to configure the Paella player to send events. Tobira itself does not yet send any data.

Before collecting any data, you have to understand the legal situation of doing so. There are two resources on this topic by Matomo:

The best way to comply with the law is to make sure the data you collect is no "personal data"/"personally identifiable information". If you must, you can instead comply with the law by asking for the user's consent. To do that, check the general.initial_consent value in configuration file.

Configuration

First, you have to tell Tobira about your Matomo server so that the correct tracking code can be loaded.

[matomo]
server = "https://matomo.my-university.edu/matomo/"
site_id = "1"

This alone won't make anything interesting happen though, as Tobira itself does not yet send any events to Matomo itself. In order to get anything out of this, you have to configure Paella to do so.

[player]
paella_plugin_config = """{
"es.upv.paella.userEventTracker": {
"enabled": true,
"context": "userTracking"
},
"es.upv.paella.matomo.userTrackingDataPlugin": {
"enabled": true,
"context": ["userTracking"],
"matomoGlobalLoaded": true,
"events": {
"category": "PaellaPlayer",
"action": "${event}",
"name": "${videoId}"
}
}
}"""

See the Paella docs for more information on configuring this. Note though that matomoGlobalLoaded should be true.