Skip to main content

Preset properties

Last updated 10/03/2026

1. Preset properties carried by all events​

The following preset properties are carried by all events in the OpenHarmony SDK, including auto-tracked events

Property nameDisplay nameProperty typeWhen collectedDescription

#ip

IP address

Text

Collected on the server

The user's IP address, which AE uses to get the user's geographic location
#countryCountryTextCollected on the serverThe user's country, generated from the IP address

#country_code

Country codeText

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
#provinceProvinceTextCollected on the serverThe user's province, generated from the IP address
#cityCityTextCollected on the serverThe user's city, generated from the IP address
#os_versionOS VersionTextCollected once at initializationiOS 11.2.2, Android 8.0.0, etc.

#manufacturer

Device manufacturerTextCollected once at initializationManufacturer of the user's device, such as Apple and vivo
#osOSTextCollected once at initializationSuch as Android, iOS, and HarmonyOS
#device_idDevice IDTextCollected once at initializationUser's device ID: IDFV or UUID on iOS, androidID on Android
#screen_heightScreen heightNumericCollected once at initializationScreen height of the user's device, such as 1920
#screen_widthScreen widthNumericCollected once at initializationScreen width of the user's device, such as 1080
#device_modelDevice modelTextCollected once at initializationModel of the user's device, such as iPhone 8
#device_typeDevice TypeTextCollected once at initializationDevice type, such as "Tablet" and "Phone"
#app_versionApp versionTextCollected once at initializationThe version of your app
#bundle_idUnique app identifierTextCollected once at initializationApp package name or process name

#lib

SDK typeText

Collected once at initialization

The type of SDK you integrated, such as Android and iOS
#lib_versionSDK versionTextCollected once at initializationThe version of the SDK you integrated
#network_typeNetwork statusTextCollected once at initialization and again when the network status changesNetwork status when the event is uploaded, such as WIFI, 3G, and 4G

#carrier

Network carrierText

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_timeApp install timeTimeCollected once at initializationTime when the user installed the app; the value comes from the system

#system_language

System languageTextCollected once at initializationSystem language of the user's device (ISO 639-1, that is, two lowercase letters), such as zh and en

2. Get preset properties​

You can call getPresetProperties() to get preset properties.

When server-side tracking needs some preset properties from the app, you can use this method to get them on the app side and then pass them to the server.

TDAnalytics.getPresetProperties()

/**
{
"#os": "HarmonyOS",
"#os_version": 10,
"#bundle_id": "com.example.tdharmonyosdemo",
"#install_time": "2023-10-19 18:46:00.105",
"#manufacturer": "HUAWEI",
"#device_model": "NOH-AN00",
"#device_type": "phone",
"#screen_width": 1344,
"#screen_height": 2772,
"#system_language": "zh-Hans",
"#carrier": "中国电信",
"#app_version": "1.0.1",
"#device_id": "9811b90b-ee24-45c1-950a-77ee0ffc7a1c",
"#zone_offset": 8
}
*/

3. Disable preset properties​

In some scenarios, for compliance or business reasons, you may want to prevent certain preset properties from being collected. When initializing the SDK, configure the disablePresetProperties parameter with an array of the properties to stop collecting. 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)
Was this page helpful?