JS
Latest version: v1.3.0
Update time: 2026-07-24
Downloads: Download
1. Overview
Starting from AE 4.4, the Engage module provides the Config Center feature, which lets you add feature parameter configurations in the AE backend and pull them to your app through the client SDK, so you can finely customize your interactions with players.
This article describes how to integrate the client SDK. 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
Config Center depends 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 |
- 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, andtdremoteconfig.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>
TDApp.init({
appId: "AppId",
serverUrl:"ServerUrl",
enableLog:true
});
4. Usage
4.1 Sample data structure
"configId" : {
"templateId" : [
{
"#strategy_id" : "f712dff93afb1e79caefdf094bda4ba2",
"paramater_x" : "1111",
"#ops_receipt_properties" : {}
}
],
"#custom_params" : {
}
}
Where:
configId: The Config ID created in the Config Center module of the Engage backend, used to identify the business module. For details about config items, see Config items
templateId: The Template ID that you add under Config Items, used to identify the specific feature module. For details about config templates, see Config templates
#strategy_id: The unique ID of the strategy, used for strategy lifecycle management. For details about config strategies, see Config strategies
paramater_x: A config template parameter, corresponding to a configuration parameter required by the feature module
#ops_receipt_properties: Used for event receipt statistics. When you need to automatically measure strategy effects (not supported yet), receipt events must carry this property
#custom_params: Custom parameters on the client config channel. You can define the user property information to be carried to the client.
4.2 Set local default values
You can set default values for config items in the TDRemoteConfig SDK. When a config item hasn't been added on the AE server, or the remote value hasn't been fetched locally, the SDK gets the local default value.
Format
Local default values must use the following format:
{
"configId": {
"templateId": [
{
"paramater_x" : ""
}
]
}
}
Set directly
TDRemoteConfig.setDefaultValues({
"configId":{
"templateId":{
"paramater_x":""
}
}
});
Clear default values
TDRemoteConfig.clearDefaultValues()
4.3 Get values
Get the content of the released and online strategies of a certain type under a config item:
let array = TDRemoteConfig.getData().get("configId").get("templateId").arrayValue();
Where:
configId: The Config ID set in Engage Config Center. For details about config items, see Config items
templateId: The Template ID set under Config Items in Engage Config Center. For details about config templates, see Config templates
Value resolution rules
How the value of a key is resolved:
- The remote config value for the key is used first
- If the key isn't configured remotely, the local default value for the key is used
- If the local default values don't contain the key either, an empty value is returned.
4.4 Listen for updates
Before you initialize the SDK, add a notification listener for successful config fetches
TDRemoteConfig.addConfigFetchListener((status)=>{
});
Parameters carried by the notification
By default, the notification carries the statuses of strategies that changed to suspended (suspend) or forced offline (force_offline) between the previous request and this request. You can use them as your business requires. If you don't need them, ignore them.
Get the notification parameters as follows
let map = statusData["strategy_status_map"];
The value structure of kTDRemoteConfigStrategyStatusMap is as follows. It describes the status of the strategy whose ID is 20241209 in the config item template.
{
"configId" : {
"templateId" : {
"20241209" : "suspend"
}
}
}
5. Send Test
To quickly verify that the integration works and that config strategies are valid, the SDK supports a test mode.
TDApp.init({
appId: "AppId",
serverUrl:"ServerUrl",
enableLog:true,
mode:"debug"
});
After you enable debug mode on the client, the client fetches test strategies every 5s. In the AE Engage module, you can create template tests or strategy tests. While waiting for the configuration to be fetched, you can watch the progress nodes on the frontend page.
For details, see the client Send Test section in Config templates.
Send tests for the client SDK require test devices. You can select or add test devices in the test device list.

