Developers download the required event data through Huawei Analytics Service, which can be imported into the developer's own analytics system to build custom reports or generate personalized analysis of audiences, etc., to help formulate effective marketing Activity. Data export supports filtering conditions based on user attributes and export events, and displays the "Estimated Number of Exportable Events". Developers choose different time periods and filter conditions, and the estimated number of events will change accordingly.
Problem Description
A developer told us that after creating a data task, he found that he was fetching data from the day before the selected date by mistake. For example, as shown in the figure below, the eventtime in the exported data report on December 18, 2021 includes events that occurred on December 17:
identify the problem
1. Determine the time baseline rules for data export.
After receiving the question, we first determined which time the time baseline rule is based on when developers create data export tasks. Then, through the cloud test data export rule, it is found that the screening date selected by the developer is judged according to the time of the analysis service cloud test server, that is, the server time.
2. Analyze the proportion and characteristics of data reported across the sky.
Taking the data of an application on December 9 as an example, the total servertime statistics data on that day is 15xxxxx, the eventtime data volume accounts for 97.3%, and the data volume including the previous day accounts for 2.65%. These data have no obvious characteristics, and the eventtime in the cloud measurement data transmission process is transparent transmission without additional calculation.
3. Check the terminal test report and reproduce it.
Event time records the time when the event was triggered, so we suspect that the event was not reported to the cloud test in time after it was triggered, but was delayed until the next day to report to the server. That is, these events are cached locally.
After communicating with the developer, we learned that it adopts the default reporting strategy, that is, the application-cutting background reporting strategy and the threshold reporting strategy. When the developer does not set the reporting policy, these two policies will take effect automatically. Therefore, it is found through recurrence that if the application is killed, the user switches to the background to trigger the event reporting, the reporting process has not been completed, and the process is killed, resulting in the failure of event reporting, which is cached locally and waits for the next report. There are two other reasons, see the root cause description in the next section.
reason
- The user switches to the background to trigger the event reporting, the reporting process has not been completed, the process is killed, resulting in the failure of event reporting, cached locally, waiting for the next report;
- When the user switches to the background to report, due to network conditions and other reasons, the report is not successful;
- For users who are using the app across the sky in the early morning, the data report will be cached and reported the next day.
solution
It is recommended that developers use the setReportPolicies interface to set four reporting policies for use together, and set the timing reporting policy to 60s-1800s (60s is the most sensitive). If it is set to 60s, even if the process is killed in this scenario, it can ensure that data other than 60s before the process is killed can be reported, avoiding data reporting delay.
For more details on HMS Core Analysis Services, please refer to:
https://developer.huawei.com/consumer/cn/hms/huawei-analyticskit/?ha_source=hms1
for more details >>
Visit HUAWEI Developer Alliance official website
Get development guidance document
Huawei Mobile Services Open Source Warehouse Address: GitHub , Gitee
us and know the latest technical information of HMS Core for the first time~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。