Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support re-aggregation of all Matomo metrics #3

Open
diosmosis opened this issue Apr 23, 2023 · 2 comments
Open

support re-aggregation of all Matomo metrics #3

diosmosis opened this issue Apr 23, 2023 · 2 comments

Comments

@diosmosis
Copy link
Member

Looker Studio supports creating reports with arbitrary dimensions and metrics. If a flattened report has multiple dimensions and only one is selected, Looker Studio will try to aggregate the columns so only a single instance of each dimension value remains in the chart.

But this only works when the right metadata is present in the connector schema (specifically, how metrics are aggregated). Currently, we set every metric to be non-re-aggregatable.

To make normal metrics in Matomo re-aggregatable:

  • introduce aggregation metadata in Matomo core and fill it out for all available reports
  • in the connector, set the aggregation based on this metadata

To make processed metrics in Matomo re-aggregatable:

  • introduce a metadata to reveal the processed metric's formula (eg, bounce_count / nb_visits)
  • introduce mechanism to include all temporary metrics used in the computation
  • in the connector
    • set metric formulas based on Matomo metadata & set aggregation to AUTO
    • fetch all temporary metrics
    • if possible, hide temporary metrics from being used by the end user

Something to keep in mind: many processed metrics in Matomo do not use columns in the report, but other data, such as metrics in past data. These would have to be made available for Looker Studio.

Workaround

There is currently a workaround that can be used in some cases. Users that want to re-aggregate can create their own calculated field that manually specifies the aggregation, and add that with the single dimension they want.

@mattab
Copy link
Member

mattab commented Feb 13, 2024

Let's create the related core issue. Once that is implemented in core, it would be great to immediately implement it in Looker Studio. Let's discuss internally the timeline.

@diosmosis
Copy link
Member Author

This is actually more complicated than I initially thought. Some metrics can be added together, but it depends on the report dimension. For example, nb_visits for different rows eg can be added together in reports that have a Visit level dimension, but not an Action level dimension (since rows for different actions can share some of the same visits).

For the first version of this feature, we should be able to allow reaggregation of some metrics in the right contexts, but not all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants