@tsteur opened this Issue on June 9th 2016 Owner

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, the visit_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 consider log_visit.visit_last_action_time but this could cause performance problems maybe.

@mattab can you confirm this?

@mattab commented on July 7th 2016 Owner

@tsteur that's a good description. I think it makes sense to count the conversion on the day that it occured, because users care more to track conversions on the correct day, rather than track the conversion in the correct visit.

Maybe we could document this "limitation" in a FAQ, but I wouldn't change the implementation. thoughts?

@tsteur commented on July 8th 2016 Owner

No thoughts, only wanted to clarify it. FAQ sounds maybe good, or at least we have it in an issue here

@tsteur commented on July 8th 2016 Owner

We could close the issue and link to this issue if a user has a question on this or something

@mattab commented on July 8th 2016 Owner

We could close the issue and link to this issue if a user has a question on this or something

:+1:

This Issue was closed on July 8th 2016
Powered by GitHub Issue Mirror