Timeline for Analytics and total time spent on the app
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 24, 2023 at 15:34 | comment | added | Stackerito | Also, is it still considered two sources of truth, if the two table track different things (The total time on the app, and the total time on each page, and they may overlap therefor the 2 tables) | |
| Jun 23, 2023 at 16:19 | comment | added | Stackerito |
In this case, I won't have overlapping or calculating twice of the same session as is happening now, and it will still be accurate because I will get the latest last_activity_time
|
|
| Jun 23, 2023 at 16:19 | comment | added | Stackerito |
thank you, I then might try to reduce the intervals. What about my other idea, about adding another session UUID column which will be assigned for the first active session, and then be copied to the consequent records (Assuming I stay with 15 minutes intervals). Then, each record of that session will have that UUID. Then when I need to calculate total time, I will query the table for unique sessions, getting the oldest visit_start_time of that unique session, and the latest last_activity_time. Then I will have total time spent per session?
|
|
| Jun 23, 2023 at 15:46 | comment | added | Doc Brown | @Stackerito: sure it will create more records. I cannot tell you if this is a probem or not for your system, only you can find out what that will mean in terms of memory and performance by measuring it. If you observe the system wastes too much memory, you may be able to replace the measurements at the end of each day by some records where you just store the total time oer URL and user. | |
| Jun 23, 2023 at 15:17 | comment | added | Stackerito | But in this specific system it's a problem: It's a website where it's common to work with 2 monitors, and actually have 2 or more pages open in different tabs and windows and move between them to compare data/insert data. That's why I wanted to count even going to other windows and coming back to it within 15 minutes as the same. But yes I can lower it down. Assuming I lower it down - it means a new record in the database after 1 minute (for example) of inactivity per page? Won't that create many records and affect the DB? | |
| Jun 23, 2023 at 14:56 | history | answered | Doc Brown | CC BY-SA 4.0 |