tpitale/legato

Method to return grouped results?

Closed this issue · 2 comments

I have discovered the usefulness of getting groups of results, like:

TotalEvent.results( *defaultopts(sort: ["event_label"]) ).for_page_path("/pricing/").collection

Or for simple total counts of metrics,

UniquePgview.results( *defaultopts ).for_page_path("/pricing/").totals_for_all_results

But what if I want to return the totals for a metric, collected by a specific dimension? For example: For the /pricing/ page, get the totals for every event Label, eg:

{ "Hero CTA" => 50, "Sign Up Button" => 75}

Do I need to manually map or merge or somehow collect results to achieve that or is there some default way of getting those collected results? Thanks for any insight!

I might need more context to fully understand the question.

Dimensions should act as "groups". E.g., pageviews by country will show total pageviews (for a given time period) for each country.

@wrydere Were you able to use Dimensions? Closing for now. Please comment if you have more questions and I'll reopen the issue.