-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix time on page calculation in visits log #18294
Conversation
@sgiehl how much more time would it take to finish it? I guess originally the idea was to eventually fix the root cause of #9198 which then would fix this as well. As this might take a while until we work on #9198 could maybe get this done now if it's real quick. There's a bit of a problem that then eg people who aggregate the page view time manually will find it's different to the reported average time. But we could probably ignore this. |
@tsteur I think the code in the PR should actually work. It would remove the "time on page" metric for all non page view actions in the visits log API. The time on page views should be summed up. |
@sgiehl this already changes quite a lot of system tests so maybe no new system test would need to be written ? https://app.travis-ci.com/github/matomo-org/matomo/jobs/547727804 |
I'd rather like to write a very simple new test that tracks some different actions and validate if the resulting number are correct and then simply update the expected results of all other tests assuming they are correct. |
3248bd5
to
7b9337c
Compare
7b9337c
to
dfc13f7
Compare
8e65a40
to
4f002e9
Compare
This PR should be ready for a first review. The time on page should now only be calculated for page views. For all other action types the Some System tests of submodule plugins are still failing, but those can be updated once this one would be ready to merge. |
@tsteur shall we merge this one for 4.7 then? |
OK sounds good |
@AltamashShaikh This most likely will break the tests for various plugins. The time spent in visit details may change in various tests. Those can be simply updated, if there are no other changes. |
Okay Thanks, |
Description:
This change would actually remove the time on page for all actions other than pageviews. For pageviews the time on page would be summed up till the next pageview.
This is an approach to fix #18270
Did the changes in a couple of minutes while checking for a possible reason. To finish this some manual testing and updating/adding tests would be needed.
@tsteur If this is something that should be worked on further, feel free to assign the PR to a milestone and I will resume the work then.
Review