-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.c: PlatformFor Matomo platform changes that aren't impacting any of our APIs but improve the core itself.For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Description
A "type" could be a plugin that defines a type "Website" or "MobileApp". For example while a type "Website" may use the wording "Visits and Visitors" another type "MobileApp" may want to use the wording "Users and Sessions".
Problems / Requirements
- We want to allow a certain type to rename any metric, eg Visits to Sessions
- Some metric names and documentation are accessed directly which is problematic eg https://github.com/piwik/piwik/blob/2.13.0-rc2/plugins/VisitsSummary/Controller.php#L64
Possible solutions
- We might need to refactor the
Metrics
class https://github.com/piwik/piwik/blob/2.13.0-rc2/core/Metrics.php#L26 into many tiny classes and only access them via those classes. Metrics is marked as @api so BC might be an issue. - We could do it in
getProcessedReport/getReportMetadata
but it would almost require that we render reports in the browser via JavaScript.
To be considered
- For the archiver refactoring in Redesign how Plugins developer define custom data Archiver #7470 we might want to have metric classes as well. Each metric class would define a metric name, the scope (visit, action, conversion, ...), format type (integer, float, money, byte, time, time in ms, time in seconds, ...) , min/max value and a metric documentation
- See Provide a way for a type to rename any report and to disable/enable reports #7823 there are reports that include metric names in the report title. Eg
Visits by days since last Visit
. It would be nice if we could rename "Visit" and "Visits" once and it would be applied in all reports as well. This is part of Provide a way for a type to rename any report and to disable/enable reports #7823 but I wanted to have it mentioned here as well. - In Use generic wording whenever possible #7826 I described that we ideally use generic wording by default and translate everything from there into a different type.
- Sometimes we handle in the context of multiple idSites and therefore different types on the same output. Eg
getReportMetadata($idSites)
. In this case we might need to fallback to generic wording and do not apply the rename (or we apply a generic rename on top). We might deprecate$idSites
in the future.
Out of scope
- The metric itself would stay the same in the beginning for simplicity, eg
nb_visits
would not becomenb_sessions
.
Metadata
Metadata
Assignees
Labels
EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.c: PlatformFor Matomo platform changes that aren't impacting any of our APIs but improve the core itself.For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.