Unreal
Android and iOS are currently supported.
Latest version: v1.0.0
Update time: 2025-01-09
Downloads: Download
Beta version: None
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 app. On the app 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. Integrate the SDK
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.0.0 |
| TDStrategy | Provides client-side triggering | >=1.0.0 |
2.1 Integrate the plugins
Download the Unreal SDK, unzip it, and put TDAnalytics TDRemoteConfig TDStrategy into your project's Plugins directory. If the Plugins directory doesn't exist, first create a Plugins directory under the project root, and then put these three plugins into it.
2.2 Activate the plugins
-
Restart Unreal Editor
-
Open Edit > Plugins, and enable
TDAnalyticsTDRemoteConfigTDStrategyunder the projectTDAnalyticsTDRemoteConfigTDStrategycategories -
Open Edit > Project Settings, and set the
TDAnalyticsTDRemoteConfigTDStrategyparameters under the Plugins category:- Server Url: Required. The receiver URL, which must be an HTTPS URL
- App ID: Required. The APP ID of your project, which you can find on the Project Settings page in the AE backend
- Enable Log: Whether to enable debug logs
-
Add the following content to the
DefaultEngine.inifile in theConfigdirectory:
[Analytics]
ProviderModuleName=TDAnalytics
- If you want to use the SDK directly in C++ code, add the following content to the
*.Build.csfile of your project:
PrivateDependencyModuleNames.AddRange(new string[] { "TDAnalytics","TDRemoteConfig","TDStrategy" });
PrivateIncludePathModuleNames.AddRange(new string[] { "TDAnalytics","TDRemoteConfig","TDStrategy" });
3. Initialization
Initialize the SDK
#include "TDAnalytics.h"
#include "TDRemoteConfig.h"
#include "TDStrategy.h"
//Initialize the SDK
UTDAnalytics::Initialize();
UTDRemoteConfig::Initialize();
UTDStrategy::Initialize();
4. Set a callback listener
After the SDK is initialized, set a callback listener for the TDStrategy SDK.
void OnTriggerResult(FString str){
}
UTDStrategy::SetTriggerListener(OnTriggerResult);
4.1 Callback data model
Property description
| 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 | JSONObject | Push content of the operation task |
| userParams | JSONObject | Custom parameters in the client channel |
| opsProperties | JSONObject | Channel information carried by the client-triggered task, used as receipt parameters for touch funnel events. |

