All Products
Search
Document Center

Quick Tracking:YonBuilder SDK

Last Updated:May 21, 2025

The qtAnalytics native plug-in encapsulates the Quick Tracking APP statistics SDK to implement the Quick Tracking statistics feature, including statistics on app data such as startup times, events, and pages.

How to use qtAnalytics native plug-ins

1. Before use, you must apply for an account from QuickTracking and create an application to obtain the appkey and receiving domain name.

Quick Tracking Official Website Integration Process Reference

2. Configure the config.xml file. After the configuration is complete, you must compile the file in the cloud to take effect. The configuration method is as follows:

  • Name: qtAnalytics

  • Parameters: ios_appkey, ios_channel, android_appkey, android_channel, primaryDomain, and standbyDomain

  • Configuration example:

<feature name="qtAnalytics">
  <param name="ios_appkey" value="YOUR_IOS_APP_KEY"/>
  <param name="ios_channel" value="YOUR_IOS_CHANNEL"/>
  <param name="android_appkey" value="YOUR_ANDROID_APP_KEY"/>
  <param name="android_channel" value="YOUR_ANDROID_CHANNEL"/>
  <param name="primaryDomain" value="YOUR_primaryDomain"/>
  <param name="standbyDomain" value="YOUR_standbyDomain"/>
</feature>
  • Field Description:

    1. ios_appkey: the key of the iOS app.

    2. ios_channel: the ID of the iOS channel.

    3. android_appkey: the key of the Android app.

    4. android_channel: the Android channel number.

    5. primaryDomain: data tracking primary endpoint.

    6. standbyDomain: data tracking sub-endpoint.

Native plug-in API

Initialization API

init

Parameter

Parameter

Required

Description

Default value

Remarks

logEnabled

Boolean

Control the output of [Quick Tracking] LOG

false

Before the app is officially launched, disable SDK running and debugging logs. Avoid irrelevant log output.

callback(ret, err)

ret

JSON object

{

status:true // Boolean type; whether the SDK is initialized successfully

}

N/A

  • This parameter is required. The type of the result must be the same as that of the current test value.

  • If the experimental value type corresponding to the parameter is a NUMBER type, the defaultValue it must also be of the number type, and the returned result experiment result is also of the number type.

err

JSON object

{

msg: 'error information' // string type; error message

}

N/A

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.init(
    {logEnabled:true},
    function(ret, err) {
        if (ret.status) {
            api.alert({
                msg: JSON.stringify(ret)
            })
        } else {
            api.alert({
                msg: JSON.stringify(err)
            })
        }
    }
);

Availability

iOS system, Android system

1.0.0 and later available

Disable tracking

disableSDK

  • Considering the privacy policy operation process control on the app side, the sdk does not have additional cache status control for the on and off identification, that is, if you want to disable the SDK function after this cold start and want to disable tracking every cold start, you need to actively call the disableSDK API function for business research and development.

  • the ios sdk can be initialized only once within the EDAS application lifecycle, and the initialization scenario depends on the communication between the network and the server. therefore, when you call the sdk to disable or enable the feature, take note of the following scenarios:

    image

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.disableSDK();

Availability

iOS system, Android system

1.0.0 and later available

Enable the SDK

enableSDK

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.enableSDK();

Availability

iOS system, Android system

1.0.0 and later available

Path Settings

resetStorePath

Check whether you have used the Umeng+ SDK. If you have used the SDK, change the SDK file path.

Important

Change the SDK file path mode:

  • You have already integrated the Umeng+ SDK. Now you need to integrate the QT SDK: Add [QTConfigure resetStorePath] to the front of all codes of QT and Umeng + (at least earlier than the receiving domain name);

  • The QT SDK has been integrated. Now you need to integrate the Umeng+ SDK: Add [UMConfigure resetStorePath] to the front of all codes of QT and Umeng+ (at least earlier than the data tracking endpoint);

If is not called based on the preceding logic, Umeng+ SDK and QT SDK use the same storage path, resulting in log confusion. The specific logic is: which SDK initialization method is called first, reset the file path of another SDK, for example, call [QTConfigure resetStorePath] for the first initialized Umeng+ SDK; If it is the first initialized QT SDK, you need to call [UMConfigure resetStorePath];

Note: If you reset the path of the QT SDK, the key values of the feature information store that are actively set for the SDK, such as the user account and application version, will change. If you need to use these fields for business processing, we recommend that you reset these fields. We recommend that you configure these fields when you integrate the QT SDK for the first time to avoid data loss.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.resetStorePath();

Availability

iOS system, Android system

1.0.0 and later available

Custom Android Device Identifier

setAndroidDeviceInfo

The SDK implements the default device identifier tracking. This default implementation class tracks the following identifiers by default.

Device identification or device information

tracking method

Remarks

AndroidID

String getAndroidID(Context context)

Android ID

Serial

String getSerial()

Android phone device serial number

IMEI

String getImei(Context context)

IMEI

IMSI

String getImsi(Context context)

IMSI

WiFiMac

String getWifiMac(Context context)

WiFiMac

OAID

String getOaid(Context context)

Advertising ID (Domestic)

GAID

String getGaid(Context context)

Google Ads ID

MCCMNC

String getMCCMNC(Context context)

MCC: Mobile Country Code MNC: mobile network number Return value: the result of concatenating MCC and MNC values. MCC is a 3-bit integer and MNC is a 2-bit integer. Example: 46011

If the developer wants to control the tracking of certain device identifiers in the preceding table, for example, the IMEI field and the Serial field are not tracked, and the OAID tracking method is implemented by the developer. You can customize these fields.

Note

  1. If you do not customize the parameter, the system tracks the data by using the Quick Tracking SDK.

  2. Before calling the SDK initialization function, call the setAndroidDeviceInfo setting function

  3. If you do not need to control the device identifier tracking, you do not need to call the

Parameters

Parameter

Type

AndroidID

String

Serial

String

IMEI

String

IMSI

String

WiFiMac

String

OAID

String

GAID

String

MCCMNC

String

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.setAndroidDeviceInfo({
    IMEI:null,
    Serial:null,
    OAID:"custom_oaid"
});
qtAnalytics.init(
    {logEnabled:true},
    function(ret, err) {
        if (ret.status) {
            api.alert({
                msg: JSON.stringify(ret)
            })
        } else {
            api.alert({
                msg: JSON.stringify(err)
            })
        }
    }
);

Availability

Android

1.0.0 and later available

customize idfa

customSetIdfa

Custom settings idfa, return without tracking''

Parameter

Type

Description

idfa

String

Apple Advertising Logo

Note: Please carefully decide whether to implement the corresponding method. Once you choose to implement the tracking method yourself, you will take over the tracking of this device identifier, and the SDK will not try to track this device identifier again. The fewer device identifiers that can be tracked by the SDK, the greater the negative impact on the accuracy and stability of statistical data.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.customSetIdfa({
    idfa: ''
});

Availability

Troubleshooting in iOS

1.0.0 and later available

custom idfv

customSetIdfv

Custom settings idfv, return without tracking ''

Parameter

Type

Description

idfv

String

Application-level identification

Note: Please carefully decide whether to implement the corresponding method. Once you choose to implement the tracking method yourself, you will take over the tracking of this device identifier, and the SDK will not try to track this device identifier again. The fewer device identifiers that can be tracked by the SDK, the greater the negative impact on the accuracy and stability of statistical data.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.customSetIdfv({
    idfv: ''
});

Availability

Troubleshooting in iOS

1.0.0 and later available

Custom openUdid

customSetOpenUdid

Custom setting openUdid, return without tracking ''

Parameter

Type

Description

openUdid

String

openUdid

Note: Please carefully decide whether to implement the corresponding method. Once you choose to implement the tracking method yourself, you will take over the tracking of this device identifier, and the SDK will not try to track this device identifier again. The fewer device identifiers that can be tracked by the SDK, the greater the negative impact on the accuracy and stability of statistical data.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.customSetOpenUdid({
    openUdid: ''
});

Availability

Troubleshooting in iOS

1.0.0 and later available

Custom utdid

customSetUtdid

The custom setting utdid, return without tracking ''

Parameter

Type

Description

utdid

String

Taobao utdid. If you have integrated the Taobao utdid SDK,QuickTracking tracks

Note: Please carefully decide whether to implement the corresponding method. Once you choose to implement the tracking method yourself, you will take over the tracking of this device identifier, and the SDK will not try to track this device identifier again. The fewer device identifiers that can be tracked by the SDK, the greater the negative impact on the accuracy and stability of statistical data.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.customSetUtdid({
    utdid: ''
});

Availability

Troubleshooting in iOS

1.0.0 and later available

Custom mcc

customSetMcc

Custom settings mcc, return without tracking ''

Parameter

Type

Description

mcc

String

Mobile Signal Country Code

Note: Please carefully decide whether to implement the corresponding method. Once you choose to implement the tracking method yourself, you will take over the tracking of this device identifier, and the SDK will not try to track this device identifier again. The fewer device identifiers that can be tracked by the SDK, the greater the negative impact on the accuracy and stability of statistical data.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.customSetMcc({
    mcc: ''
});

Availability

Troubleshooting in iOS

1.0.0 and later available

custom mnc

customSetMnc

Custom settings mnc, return without tracking ''

Parameter

Type

Description

mnc

String

cellular data network number

Note: Please carefully decide whether to implement the corresponding method. Once you choose to implement the tracking method yourself, you will take over the tracking of this device identifier, and the SDK will not try to track this device identifier again. The fewer device identifiers that can be tracked by the SDK, the greater the negative impact on the accuracy and stability of statistical data.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.customSetMnc({
    mnc: ''
});

Availability

Troubleshooting in iOS

1.0.0 and later available

Custom Device ID

setCustomDeviceId

Parameter

Type

Description

deviceId

String

The SDK supports custom UMIDs. If you want to use custom UMIDs, you must set the setCustomDeviceId API to a valid value (not empty) before initialization (that is, before init).

Note

Therefore, the function takes effect when umid is not obtained. If umid already exists on the local computer, it is invalid after setting. If you have obtained the umid locally, you can verify this feature by uninstalling and reloading it.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.setCustomDeviceId({
    deviceId: 'xxxxxx'
});

Availability

iOS system, Android system

1.0.0 and later available

Obtain the device ID

getUMIDString

Sample code

var qtAnalytics = api.require('qtAnalytics');
var umidStr = qtAnalytics.getUMIDString();

Availability

iOS system, Android system

1.0.0 and later available

Log on to the client

Users are counted based on the device. To count the accounts of an application, call the following API operation:

onProfileSignIn

Parameter

Type

Description

userId

String

The ID of the user account. The value must be less than 64 bytes in length.

Note: The account ID is stored in the local storage. The account ID becomes invalid only when the application is uninstalled, the application data is cleared, or the following logon API is called. Otherwise, each event will carry the account ID.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onProfileSignIn({userId:"custom_userId"});

Availability

iOS system, Android system

1.0.0 and later available

Logout

You must call this operation when you log off the account. After you call this operation, no account-related content is sent.

onProfileSignOff

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onProfileSignOff()

Availability

iOS system, Android system

1.0.0 and later available

Configure user properties

Before you report user attributes, you must set userId to report the user account. Otherwise, Quick Tracking does not perform correlation calculation on user attributes. After confirming the account ID of the reporting user, the API for reporting user attributes is:

setUserProfile

Parameter

Type

Description

properties

json format

User key-value pairs

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.setUserProfile({
    properties:{
        sex:"girl", // The gender.
        age:"8"// Age
    }
});

Availability

iOS system, Android system

1.0.0 and later available

Register Global Attributes

After global attributes are registered, all subsequent events will automatically include these attributes; and these attributes and attribute values are stored in the cache and cleared after the APP exits. When analyzing data, you can view and filter based on this property.

registerGlobalProperties

Parameter

Type

Description

properties

json format

Global property key-value pairs

Sample code

var qtAnalytics = api.require('qtAnalytics');
var param = {properties:{a:"1",b:"2"}};
qtAnalytics.registerGlobalProperties(param);// The current globalproperty is a:1 and b:2

var param = {properties:{b:"3",c:"4"}};
qtAnalytics.registerGlobalProperties(param);// The current globalproperty is a:1, b:3, and c:4 

Availability

iOS system, Android system

1.0.0 and later available

Delete a global attribute

unregisterGlobalProperty

Parameter

Type

Description

propertyName

String

Only supports uppercase and lowercase letters, numbers and underscores!

Sample code

var qtAnalytics = api.require('qtAnalytics');
var param = {propertyName:"lnch_Source"};
qtAnalytics.unregisterGlobalProperty(param);

Availability

iOS system, Android system

1.0.0 and later available

Obtain a global attribute based on a key

getGlobalProperty

Parameter

Type

Description

propertyName

String

Only supports uppercase and lowercase letters, numbers and underscores!

Sample code

var qtAnalytics = api.require('qtAnalytics');
var param = {propertyName:"lnch_Source"};
var gp = qtAnalytics.getGlobalProperty(param);

Availability

iOS system, Android system

1.0.0 and later available

Obtain all global attributes

getGlobalProperties

  • Description: returns a string that contains all global attributes and their corresponding attribute values, representing global attributes-attribute values in K-V key-value pairs. Separate multiple key-value pairs with commas (,). The outer layer of the data is braces. For example:{"id":"SA1375","userName":"Mike","account_type":"vip", "MemberLevel":"Level1"}

Sample code

var qtAnalytics = api.require('qtAnalytics');
var allgp = qtAnalytics.getGlobalProperties();

Availability

iOS system, Android system

1.0.0 and later available

Clear all global attributes

clearGlobalProperties

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.clearGlobalProperties();

Availability

iOS system, Android system

1.0.0 and later available

Manual tracking on the page

Developers who want to track and track statistics on page paths and page stay duration. You can call the onPageStart or onPageEnd operation to manually tracking.

Note:

  • The onPageStart SDK records page entry information. The onPageStart SDK does not report events. The onPageEnd SDK only reports page browsing events when you call the onPageEnd SDK.

  • onPageStart and onPageEnd must be called in pairs, and the pageName of the value passed must be the same. If onPageEnd is not used or the pageName of the value passed by onPageEnd is inconsistent with that of onPageStart, the information recorded in onPageStart does not take effect.

onPageStart

Parameter

Type

Description

pageName

String

The name of the custom page.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onPageStart({pageName:"MainScreen"});

Availability

iOS system, Android system

1.0.0 and later available

Manual tracking on the page ends

onPageEnd

Parameter

Type

Description

pageName

String

The name of the custom page.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onPageEnd({pageName:"MainScreen"});

Availability

iOS system, Android system

1.0.0 and later available

Upload page properties

Supports attaching custom properties to the current page.

setPageProperty

Parameter

Type

Description

pageName

String

The name of the custom page.

properties

json format

Custom properties of the page

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onPageStart({pageName:"MainScreen"});
qtAnalytics.setPageProperty({
    pageName:"MainScreen",
    properties:{
        home_param_1:"value11" // Set the properties of the current page.
    }
});

Availability

iOS system, Android system

1.0.0 and later available

Attach a custom property to the next page

You must call the onPageStart operation before the onPageStart operation on the next page.

setNextPageProperty

Parameter

Type

Description

properties

json format

Pass the business parameters to the next page.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.setNextPageProperty({
    properties: {
                nextPageProperty: "secondPageProperty"
            }
        });

Availability

iOS system, Android system

1.0.0 and later available

Event tracking point

Custom events can be used to track user behavior and record the specific details of behavior occurrence.

onEventObject

Parameter

Type

Description

eventId

String

is the ID of the event for the current statistics.

pageName

String

Page encoding at the time of the event

properties

json format

The custom property of the event.

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onEventObject({
    eventId:"play_music",
    pageName:"MainScreen",
    properties:{
        music_type:"popular", // Custom parameter: Music type. Value: Popular
        singer:"JJ", // Singer: (Junjie Lin) JJ
        Song_name:"A_Thousand_Years_Later", // song title: one thousand years later
        Song_price: 100 // price:100 yuan
    }
});

Availability

iOS system, Android system

1.0.0 and later available

Kill process protection method

If you call a method such as kill or exit to kill a process, you must call onKillProcess to save statistics.

onKillProcess

Sample code

var qtAnalytics = api.require('qtAnalytics');
qtAnalytics.onKillProcess();

Availability

Android

1.0.0 and later available

Usage notes

  • The YonBuilder platform does not provide the openURL API. Therefore, the tracking verification feature cannot be used for iOS. You can use the real-time log verification feature to perform a test. For more information about how to obtain a device ID, see Obtain Device ID.

  • YonBuilder does not support the auto-tracking feature.

  • YonBuilder does not support the sharing fission feature.