@sgiehl opened this Pull Request on August 24th 2020 Member

While making CustomReport plugin compatible with Matomo 4, I've noticed a few dimensions/metrics having incorrect values.

  • Metrics using a custom sqlSegment like daysSinceFirstVisit are archived incorrectly. As archiving currently uses the plain field value all metrics using custom sqlSegments and those based on them are incorrect. Using the sqlSegment in ArchiveMetrics::getSql() fixes that problem.

  • Dimensions in milliseconds like the new performance metrics are showing 0 values (when used as dimension), as they are grouped incorrectly. The grouping already divided them by 1000, causing the formatting to 0 the values, as it divides them another time. Grouping them in 1000 segments instead seems more correct.

  • The pagviews with performance timings metrics had an incorrect type, causing them formatted as time instead of number
@tsteur commented on August 24th 2020 Member

@sgiehl

The pageviews with performance timings metrics had an incorrect type, causing them formatted as time instead of number

wouldn't that be expected? or you mean when requesting the API with format metrics off?

@sgiehl commented on August 24th 2020 Member

I guess to group them. Otherwise there would be multiple different values
ending up in the same formatted value... Eg. 1246ms and 1249ms would both
be formatted as 1.24s

This Pull Request was closed on August 25th 2020
Powered by GitHub Issue Mirror