All Products
Search
Document Center

Quick Tracking:In-App H5 Data Reporting

Last Updated:Jun 19, 2025

1 H5 bridging scenario

1.1 how to report H5 data to H5 apps and apps at the same time?

Scenario example:

A "Spring Day" activity H5 is embedded in multiple App terminals and operated in the current mode to meet the following analysis requirements:

  • App operation needs to see the complete link data before and after the customer participates in H5 activities in App.

  • H5 activity operation needs to see the activity data of H5 in all App terminals.

Operation instructions:

  1. Create two applications:

  • An App application that has its own Appkey_app

  • A Web/H5 application that has its own Appkey_h5

  1. Call the attach interface in the app to perform H5 bridging

Reporting logs:

  1. App reports a log:

    1. Appkey is the App's "Appkey_app"

    2. The user account is the user account for the app

    3. Device ID is the device ID of the app

    4. System properties are the app's system properties

    5. Global attributes are global attributes of the tracking point in the app

    6. The event code and the event attribute are the tracking points in H5

  2. H5 reports a log:

    1. Appkey is "Appkey_h5" of H5

    2. A user account whose user account is H5

    3. The ID of the device whose device ID is H5

    4. System properties of H5

    5. The global attribute is the global attribute of the tracking point in H5

    6. The event code and the event attribute are the tracking points in H5

1.2 how to report H5 data only to the unique App application?

Scenario example:

Due to the technical architecture, some pages are H5 technical structures. Operating in the current mode can meet the following analysis requirements:

  • App business, operation, and PD can see complete full-link data in App Data.

Operation instructions:

  1. Create an app with only one Appkey_app

  2. Call the attach interface in the app to perform H5 bridging

  3. H5 Appkey is set to null and the call aplus-jsbridge-only is equal to true to disable H5 data reporting

Reporting logs:

  1. Only the app reports a log:

    1. Appkey is the App's "Appkey_app"

    2. The user account is the user account for the app

    3. Device ID is the device ID of the app

    4. System properties are the app's system properties

    5. Global attributes are global attributes of the tracking point in the app

    6. The event code and the event attribute are the tracking points in H5

1.3 if H5 data is only reported to H5 applications?

Scenario example:

  1. App business, operation and PD do not want to see H5 data in App

Operation instructions:

  1. Create two applications:

  • An App application that has its own Appkey_app

  • A Web/H5 application that has its own Appkey_h5

  1. No API calls

Reporting logs:

  1. Only H5 reports one log:

    1. Appkey is "Appkey_h5" of H5

    2. A user account whose user account is H5

    3. The ID of the device whose device ID is H5

    4. System properties of H5

    5. The global attribute is the global attribute of the tracking point in H5

    6. The event code and the event attribute are the tracking points in H5

2 H5 Bridging Principle

yuque_diagram (2)

The premise of the above method is:

  1. App integration QuickTrackingApp SDK

  2. and H5 integration QuickTracking H5 SDK within the app

The following figure shows that when a user triggers button2 on the h5 page in the app, two logs are reported at the same time:

  1. Reporting through App SDK: In the reported logs, the appkey is the appkey of the app, the global attribute is the global attribute of the app, and the event code and event attribute are the code and attribute of the tracking point in h5. (green arrow in the figure)

  2. Reporting through H5 SDK: In the reported logs, the appkey is the appkey of h5, the global attribute is the global attribute of h5, and the event code and event attribute are the code and attribute of the buried point in h5. (Yellow arrow in the picture)

3 App Bridge H5 Switch

macOS: disabled by default. It can be enabled only by setting initialization parameters.

// H5 bridge switch
@property (nonatomic) BOOL enableJSBridge;

Examples

QTSDKConfig *sdkConfig = [[QTSDKConfig alloc] initWithAppkey:@"test_appkey"
                                                  trackDomain:@"https://xxxx.com"
                                                launchOptions:nil];
// Enable H5 bridging.
sdkConfig.enableJSBridge = YES;
[QuickTrackingSDK launchWithConfig:sdkConfig];

4 H5 SDK log reporting switch

The switch API that controls the yellow arrow link:

H5 SDK API:

SDK parameters

aplus-jsbridge-only

true

Disable H5 log sending (yellow arrow)

false (Default value: false)

Turn on H5 log sending (yellow arrow)

aplus_queue.push({
  action: 'aplus.setMetaInfo',
  arguments: ['aplus-jsbridge-only', true]
});
Warning

Note: If you set the aplus-jsbridge-only parameter to true, the utm parameter in the web link is not automatically recognized as a channel parameter. You must use the global attribute to set the parameter.

5 H5 global attribute synchronization API

If you disable the following API operation in H5, the global properties that are configured by using the globalproperty parameter in aplus.appendMetaInfo or aplus.setMetaInfo in H5 do not take effect in the native app. (This interface defaults to true.)

Note that this interface is supported in qt_web_v2.0.12.

aplus_queue.push({
  action: 'aplus.setMetaInfo',
  arguments: ['Disable aplus-globalproperty-sync-enable, false] // Disable synchronization
});

For example, by default, if you set the global attribute "Current City: Beijing" in the app and set the global attribute "Current City: Shanghai" in the app H5, the global attribute of events triggered in H5 and app native will be "Current City: Shanghai". If you turn off this switch, the global properties set in H5 are not synchronized to the native app.