JS
Latest version: v1.3.0
Update time: 2026-01-07
Downloads: Download
1. Overview
Starting from AE 4.4, the Engage module provides the client-triggered task feature, which supports millisecond-level triggering in in-app scenarios such as new user registration and character creation, as well as real-time A/B splitting. On the client side, the ThinkingData SDK communicates with the AE backend to fetch and evaluate tasks.
Integrate the ThinkingData SDK into your client. On the client side, you only need to handle interactions with the ThinkingData SDK and don't need to care about task details in the AE backend.
2. Integration
2.1 Integrate the SDK manually
Client-triggered tasks depend on the following ThinkingData SDKs:
| SDK Name | Description | Version requirement |
|---|---|---|
| TDAnalytics | Collects and processes data | >= 2.1.0 |
| TDRemoteconfig | Fetches configuration from the AE backend | >= 1.1.0 |
| TDCore | Provides unified initialization | >= 1.1.0 |
| TDStrategy | Provides client-side triggering | >=1.1.0 |
- Click the download link at the top of this page to download the SDK, and then unzip it
- Drag
tdcore.umd.min.js,thinkingdata.umd.min.js,tdremoteconfig.umd.min.js, andtdstrategy.umd.min.jsinto the same directory of your project
3. Initialization
After you switch to this integration method, use the TDApp instance to initialize the SDK, and use the window.thinkingdata instance for other data collection and reporting.
<script src="./thinkingdata.umd.min.js"></script>
<script src="./tdcore.umd.min.js"></script>
<script src="./tdremoteconfig.umd.min.js"></script>
<script src="./tdstrategy.umd.min.js"></script>
<script>
TDApp.init({
appId: "AppId",
serverUrl:"ServerUrl",
enableLog:true,
autoTrack: {
pageShow: true, // Auto-track ta_page_show
pageHide: true // Auto-track ta_page_hide
},
triggerListener:function(result){
}
});
</script>
4. Set a callback listener
When you initialize the SDK, set a callback listener for the TDStrategy SDK.
//Configure in the initialization config
triggerListener:function(result){
}
TDStrategy SDK task trigger result:
| Property name | Type | Description |
|---|---|---|
| channelMsgType | String | Channel message type |
| appId | String | The app id of your AE project |
| pushId | String | Channel send ID of the operation task |
| taskId | String | ID of the operation task |
| content | object | Push content of the operation task |
| userParams | object | Custom parameters in the client channel |
| opsProperties | object | Channel information carried by the client-triggered task, used as receipt parameters for touch funnel events. |

