@mattab opened this Issue on March 5th 2018 Member

Just noticed a regression in : https://developer.matomo.org/api-reference/reporting-api-segmentation

Below the title "Metrics" it should list all metric segments. But there is nothing displayed after the Metrics title.

See the original API response here: https://demo2.matomo.org/index.php?module=API&action=listSegments&language=en

@sgiehl commented on March 9th 2018 Member

There are no metrics left to display, as all segments are dimensions or are changed to dimension after https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/API/Controller.php#L83-L85
Maybe that additional check is outdated as it converts all metric segments to dimensions?

@diosmosis commented on March 19th 2018 Member

@mattab looked further into @sgiehl's insight and saw that the if in question is regarding the "event value" segment, and noticed this segment was removed in https://github.com/matomo-org/matomo/commit/641e9ce4aca81ddb3d66983aab80e477727a1d93 . If it's not supposed to be a segment, we can remove that check to show those segments in the "Metrics" category.

@mattab commented on March 20th 2018 Member

@diosmosis segment value should be a new segment ideally, as it would be useful for some use cases.

@diosmosis commented on March 20th 2018 Member

@mattab so add a "event value" segment? and it would be a "dimension" metric, correct? I'll try to add it & then will remove the if block that's causing metric segments to be displayed as dimension segments.

This Issue was closed on March 23rd 2018
Powered by GitHub Issue Mirror