Learn how to configure H5 pages embedded in mini programs to report data to QuickTracking under different scenarios.
1. How do I report H5 data to my mini program?
For example, an H5 activity page in a mall mini program appears only within that mini program.
The business team wants to view all user access data from the mall mini program perspective, including both H5 activity pages and native mini program pages.
-
There is no need to create an independent application and appkey for the H5 in the background of QuickTracking, and the mini program can be directly used.
-
The mini program needs to be integrated with the mini program SDK of QuickTracking, H5 needs to be integrated with QuickTracking H5 SDK, and the appkey of H5 needs to be set as the appkey of the mini program
-
H5 needs to obtain the device ID and account ID of the current mini program and set them to its own device ID and account ID. The account ID needs to be set in h5 when the user logs on and in the logon state.
-
In the global attributes of H5, you must report the global attributes of the mini program obtained from the mini program, the scenario value of the mini program, the channel parameter, openid (optional, if the device ID is openid, this field is not uploaded in the global attributes), and unionid (optional, if the device ID is unionid, this field is not uploaded in the global attributes).
How to report "H5 data with multiple terminals" to each terminal in 2
For example, a points mall H5 page is embedded in multiple mini programs, such as a mall mini program and a membership hub mini program. The points mall H5 page can also be accessed directly through an official account.
Each mini program team wants user data analyzed together with its own mini program data. For example, when a user browses the H5 page from the mall mini program, the data is analyzed under the mall mini program. When accessed from the membership mini program, the data is analyzed under the membership mini program. Data from direct browser access is analyzed under the H5 application itself.
-
Create an independent application and appkey for the H5 instance in the background of QuickTracking.
-
It is necessary to judge which mini program H5 is in first. If it is an independent H5 page, use H5's own appkey. If it is in a mini program, use the appkey of the mini program currently in it. Note that mini programs need to be integrated with QuickTracking's mini program SDK, and H5 also integrates QuickTracking H5 SDK.
-
H5 needs to obtain the device ID and account ID of the current mini program and set them to its own device ID and account ID. The account ID needs to be set in h5 when the user logs on and in the logon state.
-
In the global attributes of H5, you must report the global attributes of the mini program obtained from the mini program, the scenario value of the mini program, the channel parameter, openid (optional, if the device ID is openid, this field is not uploaded in the global attributes), and unionid (optional, if the device ID is unionid, this field is not uploaded in the global attributes).
How to report "multi-end H5 data" to H5 applications in a unified way 3
For example, a points mall H5 page is embedded in multiple mini programs, such as a mall mini program and a membership hub mini program. The points mall H5 page can also be accessed directly through an official account.
The mini program teams do not want H5 data in their own analytics, while the H5 team wants to view aggregated page views in a single H5 application, including traffic from the mall mini program and the membership hub mini program.
-
Create an independent application and appkey for the H5 instance in the background of QuickTracking.
-
H5 integrates QuickTracking H5 SDK and uses H5's own appkey
-
H5 needs to obtain the device ID and account ID of the current mini program and set them to its own device ID and account ID. The account ID needs to be set in h5 when the user logs on and in the logon state.
-
In the global attribute of H5, you must report the global attribute of the mini program obtained from the mini program, the scenario value of the mini program, the application name of the mini program, the channel parameter, openid (optional, if the device ID is openid, this field is not uploaded in the global attribute), and unionid (optional, if the device ID is unionid, this field is not uploaded in the global attribute).