Mobile app-php How to design the user's time within the app

Source: Internet
Author: User
Product design wants to count how long the user is in the app, including when the user activates and shadows the app.

I now have the plan is when the app activates or when the home is built to hide, with different parameters to request the background interface, the background to do statistics.

But think about it, so the amount of data in this table will be very large. Difficult to maintain.
May I ask what is the best solution?

Reply content:

Product design wants to count how long the user is in the app, including when the user activates and shadows the app.

I now have the plan is when the app activates or when the home is built to hide, with different parameters to request the background interface, the background to do statistics.

But think about it, so the amount of data in this table will be very large. Difficult to maintain.
May I ask what is the best solution?

Simple statistics have third-party, such as friends of the league or something

1 Write access log analysis
2 One table per day

Client side Write a timer function, 30S or 60s to report the device situation

Why is the volume of data very large? If you want to count the total time, each accumulation is good, if you want to know how long each time open, that there is no lazy way, obediently set up a table, big deal scheduled backup, keep the table has a certain amount of data.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.