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 such a limitation happens, you’ll see an error message.
There are three cases where conflicting scopes appear:
- 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 average, median and 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 average, median and 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 an agreeing scope. For example, if your report uses an event-scoped dimension, use a metric calculated from an event-scoped dimension.
- Change segment or filter conditions. For example, if your report has metrics calculated for a session-scoped dimension, try to apply a session dimension in your segment or filter.
- Apply a segment or filter to a report where all metrics and dimensions agree.
- Use grouped dimensions instead of average, sum or median.
Piwik PRO stores data in three tables: a session table, an event table and a product table. When a report wants to calculate metrics from a dimension, Piwik PRO will look into the relevant table, take the needed data and run the numbers. However, if the scopes don’t agree between report dimensions and metrics calculated from a dimension, Piwik PRO won’t be able to do that. 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 would 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, but Piwik PRO would calculate it from the event table and show you inaccurate data of 2 minutes 20 seconds. This is why to avoid inaccurate data, the scopes need to agree in reports, filters and segments.