Inconsistencies in how conversions / actions / visits are attributed to a certain day #10224
Labels
wontfix
If you can reproduce this issue, please reopen the issue or create a new one describing it.
When we generate reports for visits, we aggregate data based on the
log_visit.visit_last_action_time
see https://github.com/piwik/piwik/blob/2.16.1/core/DataAccess/LogAggregator.php#L315 . This means all visits date ended on that day, are counted towards that day. It doesn't matter if the visit started on the previous day.On the other side eg for conversions we aggregate based on
log_conversion.server_time
see https://github.com/piwik/piwik/blob/2.16.1/core/DataAccess/LogAggregator.php#L793. The problem is eg if a conversion happens towards the end of the day, and the visitor stays active for a while, thevisit_last_action_time
is actually of the next day. This means we might count the visit for the next day, but the conversion for the previous day.Similar for action reports where we include all actions based on the
log_action.server_time
field see https://github.com/piwik/piwik/blob/2.16.1/core/DataAccess/LogAggregator.php#L671 . That means some actions might be counted for the previous day whereas some actions could be counted for the next day.In theory this could result to eg a day with no visits, but conversions and actions. The next day only has visits but no conversions.
A solution could be to always join with
log_visit
and to always considerlog_visit.visit_last_action_time
but this could cause performance problems maybe.@mattab can you confirm this?
The text was updated successfully, but these errors were encountered: