@richard-jerz ,
Question #3 – Exactly how is "Total Activity" time on the People web page calculated?
Starting with the technical answer, Total Activity is based off of the field Interaction Seconds, which is defined in our API as: An approximation of how long the user spent on the page, in seconds.
The code for this can be found here: https://github.com/instructure/canvas-lms/blob/master/public/javascripts/page_views.js
Time spent data is inherently difficult to nail down in online programs due to the nature of web pages and how we interact with applications. Example: A user can click on a page, spend 2 minutes reading it, then walk away from their desk for 5 minutes, come back and shut down the computer manually without ever moving the mouse or touching the keyboard. In this scenario, we have no way of knowing that the user spent 2 minutes (and only 2 minutes) reading the page. Because of this uncertainty, we have taken a conservative approach and are only considering actual activity, or interactions with the page, in our calculations.
Here are the basics of how we calculate Total Activity:
- In every second in which there was an interaction with the page (mouse/keyboard movement), increment a counter
-Don't record open-ended idle time where the user is not active on the page. Idle time in this case is >10 seconds.
- If there were at least 30 un-saved (never made it to our server) interaction seconds when the page unloads, save them in the cookie
While it is not an exact representation of time spent it, it does give an approximation of activity time for as much as we can know of for certain the user's behaviors. As others have mentioned, this data point can be improved upon. We have discussed ways of improving this metric to more closely capture actual time spent, and look forward to some day adding that to our system.
All that said, since we are incrementing a counter, and have conditions on when we store/record the data, this metric cannot be exactly reproduced via the request logs. Your team ma be able to approximate time spent from the request logs activity, however you should not expect exact replication. I know this isn't the expectation you have, however due to the way we are tracking this data point (relying on a counter, cookies in the browser, and sending data back to our servers in chunks) the data will be different.
I hope this helps with the issue of transparency you expressed earlier, and conveys and understanding that we value these metrics as an important part of understanding learning behaviors and will continue to evolve our metrics to further enhance our analytics and reporting offerings in the future.
Thanks again for taking the time to read through these comments, and to actively engage in the Community. Let us know if you have any further questions.
Best,
Kevin
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.