Skip to content

Introduce Metric classes for all available metrics #20702

@sgiehl

Description

@sgiehl

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
  • ....

refs #20701, #9319

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.Technical debtIssues the will help to reduce technical debt

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions