05/15/2024 15:19:45

TDM Channel Description

I. Overview

I. Overview

Provide a collection and reporting channel and a complete set of big data solutions for various clients such as games/apps to solve their self-built data collection and reporting problems. The official website of TDM is http://docs.tdm.woa.com/ (it is needed to access the website via the intranet).

II. Developer Platform Configuration

II. Developer Platform Configuration

2.1 Get TDM SRC ID

As a public component that provides a data reporting channel in the game/app, TDM-SDK can meet the data reporting requirements of all SDKs in APP (including the game/app itself). In order to distinguish which SDK or game/app the reported data comes from, TDM-SDK introduces the concept of SrcId. The details about access to TDM are as follows.

1. Access independent TDM-SDK
Via TDM official website -> console -> application access point, fill in the app information to access TDM-SDK.

2. Access TDM-SDK integrated with GCloud-MSDK
Access it through the TDM_SRC_ID (SrcId) value in the MSDKConfig.ini file (when GCloud downloads MSDK-TDM, it will automatically enter TDM_SRC_ID (SrcId) and the corresponding value into the MSDKConfig.ini file).

Precaution: The TDM_SRC_ID (SrcId) automatically entered by GCloud does not support storing the data reported by TDM-SDK to TDW. If you need to store the data to TDW, please refer to the method described in "1. Access independent TDM-SDK" to access TDM-SDK and modify the TDM_SRC_ID value in the MSDKConfig.ini file.

2.2 Store the reported data to TDW

Please go to TDM official website ->Console ->Data Sheet Management to add a data sheet. When the client's report is consistent with the data sheet created here, the data will be automatically stored to TDW. And after a new data sheet is added, TDM backend will perform a compliance check on the reported data. Among them, all unaudited data will not be able to access the data warehouse. The data that has not been audited or has not passed the audit will be discarded and cannot be stored or applied although it can be reported normally by the client.

III. Android Project Configuration

III. Android Project Configuration

3.1 Add permissions and settings in AndroidManifest.xml

Unity project:
Assets/Plugins/Android/gcloudsdk-gcloudcore/AndroidManifest.xml
UE4 project:
GCloudCore/Source/GCloudCoreLib/Android/GCloudCore/AndroidManifest.xml

1) Permission description

Permission Description
INTERNET [Required] get network permission
ACCESS_NETWORK_STATE [Required] get network status
//Permission configuration example
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

2) General configuration

Configuration item Description
AppId [Required] Fill in the GameID generated from the registration of the game in [GCloud official website] (http: //console.gcloud.oa.com)
TGEMIT_ROUTER_ADDRESS_FORMAL [Required]The release environment's domain name
(1) For TDM1.8 and subsequent versions:
the overseas domain name needs to be filled with https://sg.tdatamaster.com:8013/tdm/v1/route ;
domestic businesses need to fill in the site as https://hc.tdm.qq.com:8013/tdm/v1/route .
(2) For versions before TTDM1.8:
the overseas domain name needs to be filled with tsg.tdatamaster.com;
the domestic one needs to be filled with c.tdm.qq.com.
(3) If you want to independently deploy your game's release environment domain name, please contact TDM Assistant for confirmation
TGEMIT_ROUTER_ADDRESS_TEST [Required]The test environment domain name
(1) For TDM1.8 and subsequent versions, the domain name needs to be filled with https://htest.tdm.qq.com:8013/tdm/v1/route
(2) For versions before TDM1.8, it needs to be filled with test.tdm.qq.com
Test [Optional] environment configuration, true-the test environment, false-the formal environment. If not filled, the environment is defaulted as the formal environment
LogLevel [Optional] Log level configuration, 0-Debug, 1-Info, 2-Warning, 3-Error, 4-None. The default value is 2-Warning
AppChannel [Optional] Publishing channel, defined by the user
APPKEY_DENGTA [Optional] Beacon Appkey, used to generate the device ID (QIMEI); the default value 000001ZG9U3Z6L9O has been provided, which can be modified according to the actual situation

3) Demo description

TDM1.8 and subsequent versions
versions before TDM1.8
<!--Required-->
  <meta-data android:name="GCloud.TDM.AppId" android:value="@string/tdm_AppId" />
  <meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_ADDRESS_FORMAL" android:value="@string/RouterAddressFormal" />
  <meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_ADDRESS_TEST" android:value="@string/RouterAddressTest" />

  <!--Other configurations-->
  <!--All configuration items below are optional-->
  <!--<meta-data android:name="GCloud.TDM.Test" android:value="true" />-->
  <!--<meta-data android:name="GCloud.TDM.LogLevel" android:value="1" />-->
  <!--<meta-data android:name="GCloud.TDM.AppChannel" android:value="@string/tdm_AppChannel" />-->
  <!--<meta-data android:name="GCloud.TDM.APPKEY_DENGTA" android:value="@string/tdm_APPKEY_DENGTA" />-->
<!--Required-->
  <meta-data android:name="GCloud.TDM.AppId" android:value="@string/tdm_AppId" />
  <meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_ADDRESS_FORMAL" android:value="@string/RouterAddressFormal" />
  <meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_ADDRESS_TEST" android:value="@string/RouterAddressTest" />

  <!--Other configurations-->
  <!--<meta-data android:name="GCloud.TDM.Test" android:value="true" />-->
  <!--<meta-data android:name="GCloud.TDM.AppChannel" android:value="@string/tdm_AppChannel" />-->
  <!--<meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_TCP_PORT_TEST" android:value="@string/RouterAddressTestTcp" />-->
  <!--<meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_UDP_PORT_TEST" android:value="@string/RouterAddressTestUdp" />-->
  <!--<meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_TCP_PORT_FORMAL" android:value="@string/RouterAddressFormalTcp" />-->
  <!--<meta-data android:name="GCloud.TDM.TGEMIT_ROUTER_UDP_PORT_FORMAL" android:value="@string/RouterAddressFormalUdp" />-->
  <!--<meta-data android:name="GCloud.TDM.Protocol" android:value="@string/tdm_Protocol" />-->

Precautions:

  1. [Remember! You need to switch from the test environment to the formal environment before launching your app online!]
  2. TDM-related configuration needs to be configured under the Application node in AndroidManifest.xml.
  3. The values of TDM configuration items are all in string type. It is recommended that the game be configured in /res/values/string.xml.
  4. When the application installation package is released in different channels, the user needs to modify AppChannel to the corresponding channel number (defined by the application itself) to distinguish the channels in statistics. If the configuration option is not modified, TDM will perform data statistics by the same channel number. If the channel number has been inputted on the Feiying System, the inputted channel number will be used by default when no channel number is configured here.

3.2 TDM SRC ID configuration

Add settings in the project file assets/MSDKConfig.ini

[TDM debugging configuration]
MSDK_DEBUG = 1
MSDK_DEBUG_CHANNEL = TDM
[TDM channel configuration]
TDM_SRC_ID = {YOUR_TDM_SRC_ID}

Precautions:

  1. {YOUR_TDM_SRC_ID} When GcloudSDK is downloaded, the GameID on the Gcloud side will be filled in by default. If you want to access the TDM channel to report data, you need to fill in srcid gotten from TDM official website
  2. {MSDK_DEBUG} 1 means that the debug mode is turned on, 0 means that the debug mode is turned off;
  3. {MSDK_DEBUG_CHANNEL} This switch is set to TDM, meaning that TDM debugging is turned on. This switch takes effect only when {MSDK_DEBUG} is set to 1 in the same configuration file;

3.3 Obfuscation configuration

1) De-Tencentized version

-keep class com.tdatamaster.tdm.** {*;}
-keep class com.tdatamaster.** {*;}

2) Domestic version

-keep class com.tencent.tdmbeacon.** { *; }
-keep class com.tencent.tdmqmsp.** { *; }
-keep class com.tdatamaster.tdm.** {*;}
-keep class com.tdatamaster.** {*;}
-dontwarn okhttp3.*
-keep class com.tencent.tdm.** {*;}
-dontwarn com.tencent.gatherer.core.internal.provider.**
-keep class com.tencent.gatherer.core.GathererCloudResp{*;}
-keep class com.tencent.gatherer.core.GathererCloudReq{*;}
-keep class com.tencent.gatherer.core.GathererCloudConfigItem{*;}
-keep class com.tencent.turingfd.sdk.ams.gt.TNative$aa { public *; }
-keep class com.tencent.turingfd.sdk.ams.gt.TNative$aa$bb { public *; }
IV. iOS Project Configuration

IV. iOS Project Configuration

Unity project:
Assets/GCloudSDK/Editor/GCloudCore/XUPorter/Mods/GCloudCoreFrameworks.projmods
UnrealEngine project:
Project Settings-> Platform-> iOS, configure settings in Additional Plist Data(Config/DefaultEngine.ini)

1) General configuration

Configuration item Description
AppId [Required] Fill in the GameID generated from the registration of the game in GCloud official website
TGEMIT_ROUTER_ADDRESS_FORMAL [Required]The release environment's domain name
(1) For TDM1.8 and subsequent versions:
the overseas domain name needs to be filled with https://sg.tdatamaster.com:8013/tdm/v1/route ;
domestic businesses need to fill in the site as https://hc.tdm.qq.com:8013/tdm/v1/route
(2) For versions before TTDM1.8:
the overseas domain name needs to be filled with tsg.tdatamaster.com;
the domestic one needs to be filled with c.tdm.qq.com
(3) If you want to independently deploy your game's release environment domain name, please contact TDM Assistant for confirmation
TGEMIT_ROUTER_ADDRESS_TEST [Required]The test environment domain name
(1) For TDM1.8 and subsequent versions, the domain name needs to be filled with https://htest.tdm.qq.com:8013/tdm/v1/route
(2) For versions before TDM1.8, it needs to be filled with test.tdm.qq.com
Test [Optional] environment configuration, true-the test environment, false-the formal environment. If not filled, the environment is defaulted as the formal environment
LogLevel [Optional] Log level configuration, 0-Debug, 1-Info, 2-Warning, 3-Error, 4-None. The default value is 2-Warning
AppChannel [Optional] Publishing channel, defined by the user

TDM1.8 and subsequent versions
versions before TDM1.8
<key>TDM</key>
<dict>
    // Required
    <key>AppId</key>
    <string>XXXX</string>
    <key>TGEMIT_ROUTER_ADDRESS_FORMAL</key>
    <string>https://sg.tdatamaster.com:8013/tdm/v1/route</string>
    <key>TGEMIT_ROUTER_ADDRESS_TEST</key>
    <string>https://htest.tdm.qq.com:8013/tdm/v1/route</string>
    // Other configurations
    <key>Test</key>
    <true/>
    <key>LogLevel</key>
    <integer>1</integer>
    <key>AppChannel</key>
    <string>XXXX</string>
    <string>XXXX</string>
</dict>
<dict>
    // Required
    <key>TGEMIT_ROUTER_ADDRESS_FORMAL</key>
    <string>tsg.tdatamaster.com</string>
    <key>TGEMIT_ROUTER_ADDRESS_TEST</key>
    <string>XXXX</string>
    // Other configurations
    <key>TGEMIT_ROUTER_TCP_PORT_FORMAL</key>
    <string>XXXX</string>
    <key>TGEMIT_ROUTER_UDP_PORT_FORMAL</key>
    <string>XXXX</string>
    // Related to the test environment
    <key>TGEMIT_ROUTER_TCP_PORT_TEST</key>
    <string>XXXX</string>
    <key>TGEMIT_ROUTER_UDP_PORT_TEST</key>
    <string>XXXX</string>
    <key>TDM</key>
    <dict>
        //Required
        <key>AppId</key>
        <string>XXX</string>
        //Other configurations
        <key>Test</key>
        <true/>
        <key>AppChannel</key>
        <string>XXXX</string>
        <key>Protocol</key>
        <string>XXXX</string>
    </dict>
</dict>

iOS configuration example's screenshot

Precautions:
1.[Remember! You need to switch from the test environment to the formal environment before launching your app online!]
2.System library dependency description: need to add libc++.tbd, libsqlite3.0.tbd, UIKit.framework, Foundation.framework, CoreTelephony.framework (get network status ), SystemConfiguration.framework、libz.tbd、AdSupport.framework、libresolv.tbd. (TDM 1.11 and later versions add it)
3.When the app installation package is released at different channels, the user needs to modify AppChannel to the corresponding channel number (defined by the app itself) to distinguish channels in the statistics. If the configuration item is not modified, TDM will perform data statistics according to the same channel number. If the channel number has been inputted on the Feiying system, when the item is not configured here, the inputted channel number will be used by default.

4.2 TDM SRC ID configuration

Find MSDKAppSetting.bundle/MSDKConfig.ini file in the project and add the following settings into it

[TDM debugging configuration]
MSDK_DEBUG = 1
MSDK_DEBUG_CHANNEL = TDM
[TDM channel configuration]
TDM_SRC_ID = {YOUR_TDM_SRC_ID}

Precautions:

  1. {YOUR_TDM_SRC_ID} When GcloudSDK is downloaded, the GameID on the Gcloud side will be filled in by default. If you want to access the TDM channel to report data, you need to fill in srcid gotten from TDM official website;
  2. {MSDK_DEBUG} 1 means that the debug mode is turned on, 0 means that the debug mode is turned off;
  3. {MSDK_DEBUG_CHANNEL} This switch is set to TDM, meaning that TDM debugging is turned on. This switch takes effect only when {MSDK_DEBUG} is set to 1 in the same configuration file;
V. Data Reporting

V. Data Reporting

5.1 Key-value user-defined event reporting

1) Functional description

Key-value user-defined event reporting. The same with ReportEvent reporting mode in Report module.

Warning:

  1. When reporting key-value custom events, do not use the MSDKReportFile or MSDKReportBinary keyword as key;
  2. Key-value custom event reporting and binary reporting cannot be performed in the same reporting event and need to be invoked in two separate times.

5.2 Binary reporting

1) Functional description

Report a large amount of data in the binary mode, with a maximum of 12MB. The calling method of binary reporting is also the ReportEvent interface. MSDK encapsulates two parameter-inputting modes only in EventName: one is the file address mode and the other is the binary array mode.

2) Demo code

  1. File address mode

    C#
    C++
    string filePath = getFilePath ("launch_640x960.png");
    Dictionary<string, string> paramsDic = new Dictionary<string, string> ();
    // In case of the file address mode, "MSDKReportFile" is a fixed parameter and cannot be modified
    paramsDic.Add ("MSDKReportFile", filePath);
    // In case of the file address mode, "Report-File" parameter can be user-defined
    MSDKReport.ReportEvent ("Report-File", paramsDic, "", true);
    std::string filePath = getFilePath();
    std::map<std::string, std::string>params;
    // In case of the file address mode, "MSDKReportFile" is a fixed parameter and cannot be modified
    params.insert(std::make_pair("MSDKReportFile", filePath.UTF8String));
    // In case of the file address mode, "Report-File" parameter can be user-defined
    MSDKReport::ReportEvent("Report-File", params);

  2. Binary data mode

    C#
    C++
    byte [] data = getBytes();
    string dataStr = System.Text.Encoding.UTF8.GetString (data); ;
    Dictionary<string, string> paramsDic = new Dictionary<string, string> ();
    // In case of the binary data mode, "MSDKReportBinary" is a fixed parameter and cannot be modified
    paramsDic.Add ("MSDKReportBinary", dataStr);
    //  In case of the binary data mode, "Report-Binary" parameter can be user-defined
    mReportTestMgr.mTestModuleReport.ReportEvent ("Report-Binary", paramsDic, "", true);
    std::string localDefaultConfig = getFileByteToString() ;
    std::map<std::string, std::string>params;
    // In case of the binary data mode, "MSDKReportBinary" is a fixed parameter and cannot be modified
    params.insert(std::make_pair("MSDKReportBinary", localDefaultConfig));
    //  In case of the binary data mode, "Report-Binary" parameter can be user-defined
    MSDKReport::ReportEvent("Report-Binary", params);

[info] Since a thread is started each time the binary data reporting interface is called, it is not recommended that the accessor frequently call the binary data reporting interface.

5.3 TDM log level settings

As for TDM's log level setting interface, please refer to "4.TDM Description" in GCloudSDK log description .

VI. Introduction of Overseas Access Features

VI. Introduction of Overseas Access Features

6.1 Encrypt sensitive information

1. Versions before TDM1.8

1) Find out the encrypt.json file from TDM-SDK
2) Put the encrypt.json file under the root directory of Android assets or the root directory of iOS (you can find this file after decompressing IPA)

2. TDM1.8 and later versions

1) Configure through GCloud.TDM.EncryptDeviceInfo in AndroidManifest.xml

//Encrypted fields' configuration. If there are multiple fields that need to be encrypted, separate them with ","
<meta-data android:name="GCloud.TDM.EncryptDeviceInfo" android:value="@string/EncryptDeviceInfo" />

2) Configure through TDM.EncryptDeviceInfo in info.plist

<key>TDM</key>
<dict>
    <key>EncryptDeviceInfo</key>
    <array>
        <string>DeviceID</string>
        <string>carrier</string>
        <string>UUID</string>
    </array>
</dict>

3. How to query "the encrypted field automatically reported by TDM"?

Go to LogX - Game TGlog log real-time retrieval platform, and observe whether i_uuid and i_carrier fields in the reported data are encrypted. The query details are as follows.

Description Field in the documentation Field in the database logx field
device ID KDeviceID device_id device_id/i_uuid
Physical address kMacAddr mac_addr mac_addr
Carrier identifier kCarrier i_carrier i_carrier
User app name kUserAppNames app_names app_names

Precaution:
1.device_id and mac_addr will be reported only in case of TDM internal startup event (Srcid=1, Eventid=101);
2.app_names will be reported only in case of TDM internal extension event (Srcid=1, Eventid=104);
3.After the above sensitive information is encrypted, the fields drawn from TDM server is in the encrypted status, such as device_id=DfsuKKJ2f2o1vWxnlNgWu0Ap7VyMWaX6W7gzLD+uuYJEJjvlG8lsUGFuwBSoBO6Z&amp app_names=as4rY4uiFwk+RCfrVlibMln/BDF0X5G7WaGFikWzmqo. You need to contact the TDM Assistant to restore the encryption information and verify if the encryption is correct;

VII. Query the reported data

VII. Query the reported data

7.1 The test environment

1) User-defined event reporting

(1)Query address: LogX platform
(2) Permission application: Apply for "TDM domestic test" business permission.
(3) Query method: Query the reported data by selecting the reporting time and "TDM domestic test" business and filling in keywords, as shown in the figure below.

TDM test environment query

2) Binary reporting

(1) Download tools and their use instructions: Tencent Cloud COS Desktop
(2) Tencent Cloud COS desktop terminal key login information, please contact TDM assistant to obtain.

Precaution:
1.In Tencent Cloud COS Desktop, TDM's reporting data is only retained for 3 days;
2.Query the binary reporting content. the naming rule of the file path is {src_id}/{app_id}/{eventname}/{yyyy-MM-dd}/{uuid_timestamp};

7.2 The formal environment

1) User-defined event reporting

(1)Query address: LogX platform
(2) Permission application: Apply for "TDM domestic formal"/"TDM Singapore formal" business permission.
(3) Query method: Query the reported data by selecting the reporting time and "TDM domestic formal"/"TDM Singapore formal" business and filling in keywords, as shown in the figure below.

TDM formal environment query

2) Binary reporting

Please contact TDM Assistant for guidance.

Precaution: After switching to the formal environment, please make sure that the Test configuration of TDM in GCloudCoreFrameworks is false (namely the formal environment).

VIII. Frequently Asked Questions

VIII. Frequently Asked Questions

8.1 TDM version upgrade guide

  1. As for the correspondence between TDM version and MSDK version, please refer to SDK version relationship description table.

  2. As for TDM version upgrade guidelines, please refer to TDM update log —> Version update guidelines.

TDM release environment query

Warning: For example, if you want to upgrade TDM1.9 to TDM1.11, you need to see the contents of TDM1.10 and TDM1.11.

8.2 View TDM version number

You can refer to View TDM version number.

8.3 LogX platform query data. The current business is not found

LogX platform data query. The business selection here is not to select a specific business, but to select TDM environment. The business side can apply for permissions according to actual needs, such as: TDM domestic test / TDM domestic formal / TDM Singapore formal, etc.

8.4 Data storage issue

You can refer to Instructions on storing user-defined 'key-value' data to TDW.



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""