In the process of product operation, it is necessary to pay attention to the changes of the core indicators of the product on a daily basis and monitor its overall operation status. The Huawei Analytics Service provides a card for viewing new users, which displays the number of new users, the number of sessions per capita, the duration of per capita visits, and the number of page views per capita. With the help of this page operation, you can observe the new pull effect and judge the attractiveness of the product to new users.
Problem Description
After integrating Huawei Analytics, a developer found that the per capita session duration on the AGC overview page suddenly doubled, but the number of per capita sessions did not change, as shown in the following figure:
The mutation phenomenon does not conform to normal logic, and it is necessary to deeply locate the cause of the mutation.
positioning process
(1) Eliminate the abnormal problem of cloud measurement data synchronization process
First, check whether each computing node of HUAWEI Analytics Cloud Test is abnormal. By checking each cloud test node, no abnormalities were found, and the number of users and events collected from the end test did not change at each cloud test node.
(2) Whether there are any major changes on the client side on the day of the sudden increase in data
After confirmation, the developer released a new version the day before the problem occurred. However, there is no major content change in the release of the new version of the customer, and it is still difficult to explain the sudden increase of the per capita session time to more than 2 times;
(3) Analyze user events and user attributes that change greatly
By analyzing the user events and user attributes on the live network, it is found that some users on the live network whose setAnalyticsEnabled switch was originally false were set to true. The original switch state is not inherited in the new version of the app. Eventually, a new batch of users participating in the analysis will be added, and the session duration of these users will be long, which will eventually lead to an increase in the per capita session duration.
Taking a closer look at this group of new users, we found that they are mainly iOS users. At that time, iOS did not provide a mechanism to close the session in the background, so iOS users did not close the session 30 seconds after switching to the background like Android, but did not close the session until the system or the user completely closed the app, so iOS system users Session times are longer, resulting in a spike in overall average session length.
Reason summary
After the new version of the developer app was launched, some users on the live network whose setAnalyticsEnabled switch was false were set to true, and a new batch of users participated in the analysis. That is, a group of users who did not participate in the analysis on the existing network participated in the analysis after the app was upgraded, and the developers did not inherit the original switch state in the new version of the app. As a result, a new batch of users participated in the analysis, and the vast majority of these users were iOS users. At that time, iOS did not provide an interface to close the session in the background, resulting in a sudden increase in the overall per capita session time.
solution
1. The update of the new version of the App is to inherit the setAnalyticsEnabled switch state of the previous version;
2. HUAWEI Analytics will provide a session closing interface for the iOS version of the SDK in the future. Developers can customize the session closing strategy at that time, which can solve the problem of sudden increase in session duration.
Learn more details>>
Visit the official website of Huawei Developer Alliance
Get development guidance documents
Huawei Mobile Services Open Source Warehouse Address: GitHub , Gitee
Follow us to know the latest technical information of HMS Core for the first time~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。