Compliance guide
1. Latest SDK version
Latest SDK version that meets the new regulatory requirements: 1.7.6
2. Compliance requirements for permission usage
| Permission name | Description | Purpose | When requested |
|---|---|---|---|
| ohos.permission.INTERNET | Allows access to the Internet | Used to access the network when reporting data | When the SDK is initialized or the data reporting API is called |
| ohos.permission.GET_NETWORK_INFO | Allows the app to get network information | When reporting data, the SDK decides whether to send data based on the network status | When the SDK is initialized |
| ohos.permission.STORE_PERSISTENT_DATA | Allows the app to store persistent data | Stores data that must stay unchanged after the app is uninstalled | When the SDK is initialized |
3. Delayed initialization requirements
To prevent the SDK from processing users' personal information before your app obtains their consent, initialize the SDK only after the user agrees to the Privacy Policy.
The sample code is as follows:
// Determine whether to enable data collection based on the privacy policy
if (isPrivacyPolicyAccepted) { // The user has accepted the Privacy Policy
TDAnalytics.init(context, "appId", "serverUrl")
}
When the SDK is initialized, it collects information such as the OS version, device manufacturer, operating system, screen resolution, device model, APP version, network status, network carrier, app install time, and system language for statistical analysis.
4. Configure optional personal information in the SDK
Developers can configure optional personal information by following the SDK configuration examples below. When initializing the SDK, configure the disablePresetProperties parameter with an array of the device information to disable. disablePresetProperties is an empty array by default, which means all preset properties are collected by default. To disable a preset property, add it to the disablePresetProperties array.
The following preset properties are collected by default for all events in the SDK:
| Property name | Display name | Property type | When collected | Description |
|---|---|---|---|---|
#ip | IP address | Text | Collected on the server | The user's IP address, which AE uses to get the user's geographic location |
| #country | Country | Text | Collected on the server | The user's country, generated from the IP address |
#country_code | Country code | Text | Collected on the server | The country code of the user's country (ISO 3166-1 alpha-2, that is, two uppercase letters), generated from the IP address |
| #province | Province | Text | Collected on the server | The user's province, generated from the IP address |
| #city | City | Text | Collected on the server | The user's city, generated from the IP address |
| #os_version | OS Version | Text | Collected once at initialization | iOS 11.2.2, Android 8.0.0, etc. |
#manufacturer | Device manufacturer | Text | Collected once at initialization | Manufacturer of the user's device, such as Apple and vivo |
| #os | OS | Text | Collected once at initialization | Such as Android, iOS, and HarmonyOS |
| #device_id | Device ID | Text | Collected once at initialization | User's device ID: IDFV or UUID on iOS, androidID on Android |
| #screen_height | Screen height | Numeric | Collected once at initialization | Screen height of the user's device, such as 1920 |
| #screen_width | Screen width | Numeric | Collected once at initialization | Screen width of the user's device, such as 1080 |
| #device_model | Device model | Text | Collected once at initialization | Model of the user's device, such as iPhone 8 |
| #device_type | Device Type | Text | Collected once at initialization | Device type, such as "Tablet" and "Phone" |
| #app_version | App version | Text | Collected once at initialization | The version of your app |
| #bundle_id | Unique app identifier | Text | Collected once at initialization | App package name or process name |
#lib | SDK type | Text | Collected once at initialization | The type of SDK you integrated, such as Android and iOS |
| #lib_version | SDK version | Text | Collected once at initialization | The version of the SDK you integrated |
| #network_type | Network status | Text | Collected once at initialization and again when the network status changes | Network status when the event is uploaded, such as WIFI, 3G, and 4G |
#carrier | Network carrier | Text | Collected once at initialization | Network carrier of the user's device, such as China Mobile and China Telecom |
#zone_offset | Time Zone Offset | Numeric | Collected when the event occurs | Offset in hours of the data time relative to UTC |
| #install_time | App install time | Time | Collected once at initialization | Time when the user installed the app; the value comes from the system |
#system_language | System language | Text | Collected once at initialization | System language of the user's device (ISO 639-1, that is, two lowercase letters), such as zh and en |
For example, to disable #os (operating system) and #os_version (OS version), use the following sample code:
let config = new TDConfig()
config.appId = 'appId'
config.serverUrl = 'url'
config.disablePresetProperties =["#os", "#os_version"]
TDAnalytics.initWithConfig(context, config)
To disable all preset properties, add all of them to the disablePresetProperties array. Sample code:
let config = new TDConfig()
config.appId = 'appId'
config.serverUrl = 'url'
config.disablePresetProperties =["#lib", "#lib_version", "#os", "#os_version", "#bundle_id", "#install_time", "#manufacturer", "#device_model",
"#device_type", "#screen_width", "#screen_height","#system_language","#carrier","#app_version","#device_id","#network_type","#ip"]
TDAnalytics.initWithConfig(context, config)
5. Privacy policy disclosure requirements and examples
Before you integrate and use the ThinkingData SDK service, we require you to inform users in your privacy policy of our SDK name, the SDK provider name, the types of personal information collected, the purpose of use, and the privacy policy link, and to obtain user consent or another legal basis. You can provide the terms as follows:
Third-party SDK name: ThinkingData SDK
Third-party company name: 数数信息科技(上海)有限公司
Types of personal information collected: In the section of your Privacy Policy on collecting and obtaining your personal information, fill in the following content based on your actual situation: When you activate and use the App, we collect your device information (location information resolved from the IP address, country, country code, province, city, OS version, device manufacturer, operating system, screen resolution, device model, APP version, network status, network carrier, app install time, and system language) through the ThinkingData SDK.
When personal information is collected: When the SDK is initialized.
Purpose of use: For statistical analysis of how users use the App.
Privacy policy link: ThinkingData SDK Privacy Statement
6. Recommended ways to obtain end-user consent
When the App runs for the first time, it should show a privacy pop-up. The pop-up should present a short version of the privacy policy with a link to the full privacy policy, and clearly prompt the end user to read the privacy policy and choose whether to agree to it. The privacy pop-up should provide an Agree button and a Disagree button, and the end user should actively make the choice.
We recommend obtaining user consent through a pop-up. The pop-up content must include the permissions the ThinkingData SDK needs to request and the user-related information it collects.
Example of a privacy policy consent pop-up:
Example of a sensitive personal information consent pop-up:

