-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Matomo currently already contains a plenty of Metric classes. Most of those metrics either need to be calculated/processed or require a special formatting. But our "default" metrics like visits, page views, hits,... don't have such classes.
The names and format of such metrics are currently defined in global Metrics classes. e.g. https://github.com/matomo-org/matomo/blob/eeb6e3b84f1340d10421e714231f22bbe75fe986/core/Metrics.php
It might be a lot more straight forward to define everything around a certain metric in its own class instead of heaving to implement certain events in order to define the name and stuff like if a lower value is better than a higher.
Having metric classes for everything would also allow us to clearly define in a report class, which metrics the report holds.
Doing that would open up a lot new possibilities, like
- Generating a better glossar for all metrics
- Allowing to search reports by containing metrics
- ....