The product design wants to calculate the length of time a user spends in the app, including the time when the user activates and hides the app. My current solution is to request backend interfaces with different parameters when the app is activated or hidden Based on the home page for statistics. However, if you think about it, the data volume of the table will be very large... the product design wants to count the duration of the user's time in the app, including the time when the user activates and hides the app.
My current solution is to request backend interfaces with different parameters when the app is activated or hidden Based on the home page for statistics.
However, the data volume of the table will be very large. Difficult to maintain.
Is there any better solution?
Reply content:
The product design wants to calculate the length of time a user spends in the app, including the time when the user activates and hides the app.
My current solution is to request backend interfaces with different parameters when the app is activated or hidden Based on the home page for statistics.
However, the data volume of the table will be very large. Difficult to maintain.
Is there any better solution?
Simple statistics include third parties, such as umeng.
1. Write access log analysis
2. One Table per day
Write a timer function on the client side to report device status every 30 S or 60 s
Why is the data volume very large? If you want to count the total length of time and accumulate each time, if you want to know how long it takes to open it, there is no way to be lazy. You just need to create a table, so it's a big deal to back up regularly, maintain a certain amount of data in the table.