Some dimensions and metrics can’t be combined due to conflicting scopes. Such limitation can occur in a custom report, applied segment or applied filter and is designed to protect you from inaccurate data. If this happens, you’ll see an error message.
There are three cases in which dimensions and metrics can’t be combined:
- An event-scoped dimension can’t be combined with a metric calculated from a session-scoped dimension. Example: Page URL can’t be combined with average session time.
- A product-scoped dimension can’t be combined with an average, median or sum calculated from a session-scoped dimension. Example: Product brand can’t be combined with average session time.
- A product-scoped dimension can’t be combined with an average, median or sum calculated from an event-scoped dimension. Example: Product variant can’t be combined with sum of revenue.
To fix the problem, you can:
- Spot the conflicting metric and replace it with a metric calculated from a conflict-free scope. For example, if your report uses an event-scoped dimension, use a metric calculated from an event-scoped dimension.
- Change the segment or filter conditions. For example, if your report includes metrics calculated for a session-scoped dimension, try to apply a session dimension in your segment or filter.
- Apply segments or filters only to reports where all metrics and dimensions are conflict-free.
- Use grouped dimensions instead of an average, sum or median.
Piwik PRO stores data in three tables: a session table, an event table and a product table. When a report needs a certain dimension to calculate a particular metric, Piwik PRO will identify the relevant table, extract the needed data and run the numbers. But it won’t be able to do so if the scopes are not in agreement between report dimensions and metrics calculated from a dimension. Let’s look at an example.
We have a dataset of two sessions with several events that occurred during those sessions. Our session table has the following data:
|Session ID||Session time||Events in session|
And our event table has the following data:
|Page URL||Session time||Session ID|
Our report contains the average session time, a metric calculated from the session time dimension. If Piwik PRO were to calculate it for each table, the results would be:
|Session table||Event table (inaccurate data)||Event table (accurate data)|
|Average session time = (3:00 + 1:00) / 2 = 2:00||Average session time for /home = (3:00 + 3:00 + 1:00) / 3 = 2:20||2:00|
As we can see, the average session time for all visits that included the page /home is 2 minutes. However, Piwik PRO would use figures from the event table to calculate it, and, as a result, present an inaccurate session time of 2 minutes 20 seconds.
So to avoid ending up with inaccurate data, you need to make sure that the scopes in reports, filters and segments are conflict-free.