Skip to main content

JS

Last updated 10/03/2026

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 NameDescriptionVersion requirement
TDAnalyticsCollects and processes data>= 2.1.0
TDRemoteconfigFetches configuration from the AE backend>= 1.1.0
TDCoreProvides unified initialization>= 1.1.0
TDStrategyProvides client-side triggering>=1.1.0
  1. Click the download link at the top of this page to download the SDK, and then unzip it
  2. Drag tdcore.umd.min.js, thinkingdata.umd.min.js, tdremoteconfig.umd.min.js, and tdstrategy.umd.min.js into 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 nameTypeDescription
channelMsgTypeStringChannel message type
appIdStringThe app id of your AE project
pushIdStringChannel send ID of the operation task
taskIdStringID of the operation task
contentobjectPush content of the operation task
userParamsobjectCustom parameters in the client channel
opsPropertiesobjectChannel information carried by the client-triggered task, used as receipt parameters for touch funnel events.
Was this page helpful?