@diosmosis opened this Issue on September 16th 2014 Member

This ticket is for allowing some way to specify one or more dimensions that can be used to group metric result. For example, the query: groupBy=city&method=Referrers.getKeywords could result in:

{ // a DataTable\Map
    'Tokyo': [
        {'label' => 'keyword1', 'nb_visits': ...},
    'London': [
        {'label' => 'keyword1', 'nb_visits': ...},

To accomplish efficiently this will require changing the archiving code significantly and should wait until it is refactored.

@mattab commented on September 17th 2014 Owner

+1 this is a killer feature indeed! Unfortunately not trivial.

We could start making it work for one level groupBy=city but then we could extend to support several dimensions groupBy=city,country. This would be so powerful!

Note: The beauty of this solution is that it will enable Custom Reports ie. create any combination of dimensions and sub-tables. This is the first step required for #4776 Custom Reports, Pivot table feature for Piwik

@diosmosis commented on September 19th 2014 Member

If implemented, perhaps site ID and period can be turned into segments so there is just the segment query. Just an idea that popped into my head, maybe not a good idea, but seems like it would make the API more generic.

@diosmosis commented on September 19th 2014 Member

If implemented efficiently, we can remove 'subtable' archiving code for reports like Referrers.getKeywords and Events.getName, since we can just use a groupBy in archiving. Actions will still need subtables though.

@loopmode commented on January 17th 2018

this would also allow a fix for https://github.com/matomo-org/matomo/issues/11755, right?

@tsteur commented on January 17th 2018 Owner

BTW this can be done with Custom Reports. You can create a report via the API and specify by what it should be grouped, then fetch the report...

Learn more about the power of Custom Reports in the user guide: https://piwik.org/docs/custom-reports/ or FAQ: https://piwik.org/faq/custom-reports/

This premium plugin can be purchased here: https://plugins.piwik.org/CustomReports

@diosmosis commented on January 17th 2018 Member

@tsteur if this functionality is provided by a plugin, can this be closed?

@mattab commented on January 17th 2018 Owner

Considered done as it is available in custom reports product: https://piwik.org/docs/custom-reports/

@loopmode commented on January 18th 2018

Too bad this gets closed, as the plugin/product is apparently not free: https://plugins.matomo.org/CustomReports

This Issue was closed on January 17th 2018
Powered by GitHub Issue Mirror