I think I may have spottet a really weird issue in the Audience Report.
It seems that the number of sessions is not always displayed or calculated correctly in the here. When I use the standard “All visitors” segment without comparison it shows 7.6 mio. sessions. If I add another segment for comparison, it shows 7.7 mio sessions. However that segment must include a page url filter. If I use a segment without this filter, it shows 7.6 mio once again.
In all the other reports (dashboards, engagement etc.) the amount of sessions always shows 7.7 mio. I would therefore assume 7.7 mio is the correct amount of sessions that should be displayed.
There’s no sampling and it doesn’t matter if I change the date range. I’ve checked a few of our properties/websites and the issue is also present there. It also seems to be present as far as I can go back in data (March 2023).
It doesn’t seem to affect dashboards and custom reports. It doesn’t affect the visitor or page views metric either.
The issue is somewhat concerning to us, and I would appreciate a quick response. We have a large number of websites and users who rely on daily precise reporting.
If it is indeed a bug, I would like to know when it was introduced and if has also affected other reporting tools, as we would need to update quite a lot of internal reports accordingly.
If it on the other hand is not a bug, I would still like to know what causes this discrepancy.
Hi again I looked into it and it’s a discrepancy caused by different scopes.
Piwik PRO stores and calculates data in three scopes: event, session and product. The “session” metric you mentioned is normally in the session scope, but when you apply a segment that filters the “page URL” dimension, the scope is changed to event, which can cause discrepancies for certain metrics or dimensions.
For the “session” metric especially, calculating it in an event scope can be misleading due to sessions that span over two days (someone going over midnight for example). Normally you would count that as one session based on the session start date, but the event scope forces a calculation where the event date is used for calculations. That’s why you’re seeing more sessions in the event scope.
Hmm I think I get it technically, but I feel it still leaves my question unanswered.
First off let me get this straight and make sure I understand it:
So if no filter is attached, the session metric visual will count the precise number of sessions, based on the session startdate. But if I apply a filter, it will count the number of days in which that filter was true and thus base the calculation on the count of event dates, which is why I’m seeing a higher number of sessions, when I add a filter with an event scope. Is that correct?
But that still leaves my question somewhat unanswered on the standard reports. Why would the segment “All visitors” calculation of sessions change when I apply another segment? Shouldn’t it stay the same regardless? Why would a filterscope in one segment overwrite a (non)filter in another segment?
So if no filter is attached, the session metric visual will count the precise number of sessions, based on the session startdate. But if I apply a filter, it will count the number of days in which that filter was true and thus base the calculation on the count of event dates, which is why I’m seeing a higher number of sessions, when I add a filter with an event scope. Is that correct?
Yes, that’s correct.
Why would the segment “All visitors” calculation of sessions change when I apply another segment?
It’s not actually the “All visitors” segment that’s changing, it’s the session counter. You can see on your screenshots that the “visitors” counter is the same while the “session” one changes because of how sessions are calculated in different scopes. Adding the Page URL filter comparison “forces” the session counter to switch to the event scope.