Skip to content

Add possibility to rename metrics based on the type of the site #7824

@tsteur

Description

@tsteur

Needed for #7131 and #4734.

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

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

Out of scope

  • The metric itself would stay the same in the beginning for simplicity, eg nb_visits would not become nb_sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions