@mattab opened this Issue on September 10th 2019 Member

Unique Visitors metric appear in Graph metric selector for periods for which the metric is disabled, causing confusion amongst users. And also many support requests to our team.

--> When Unique Visitors metric is disabled for the currently selected period, let's hide it from the evolution graph metric picker.

This is what it currently looks like (no data for Unique Visitors):
Screenshot from 2019-09-10 16-09-37

@mattab commented on September 30th 2019 Member

It is working for the main use case, but there is still a little issue:

  • Open a weekly report, plot the Unique Visitors metric in the graph.
  • Switch to the monthly report by eg. double click on "month" radio in calendar
  • The evolution graph still shows Unique Visitors metric with 0 values:

Screenshot from 2019-09-30 13-07-59

-> Even when the metrics are saved as user preferences, the "Unique visitors" metric preference should be ignored when the Unique Visitors feature is disabled for the currently selected period.

@mattab commented on October 8th 2019 Member

@sgiehl are you able to fix this issue maybe?

@sgiehl commented on October 11th 2019 Member

@mattab That's are more general problem that needs to be solved. It might always be possible that a metric that is selected for display might become unavailable. E.g. if a plugin metric is chosen and the plugin is disabled.

Also it is not possible to simply remove the metric from the list, as it could then happen that no metric to display remains. In this case a default metric might need to be displayed. But how would such a default metric be determined? The first metric appearing in the report?

Imho we should plan for Matomo 4 to create a metric class for every existing metric. That way we can simply use such classes to check if a metric is available and maybe even use those classes to define alternative metrics to display if one is not available.

@mattab commented on October 11th 2019 Member

Maybe for now we could remove all the metrics that are not defined or
available (but we would still display them when the value is 0), unless it
was the only metric left. This would prevent the issue end maybe you can
follow up with the proper solution in a different issue. It is important
and valuable to hide the unique visitors metrics from graphs in 3.12 👍

This Issue was closed on October 13th 2019
Powered by GitHub Issue Mirror