Skip to main content

Preset properties

Last updated 10/07/2026

1. Preset properties carried by all events​

The following preset properties are carried by all events in the SDK

Property nameDisplay nameProperty typeDescription

#ip

IP addressTextThe user's IP address, which AE uses to get the user's geographic location
#countryCountryTextThe user's country, generated from the IP address

#country_code

Country code

TextThe country code of the user's country (ISO 3166-1 alpha-2, that is, two uppercase letters), generated from the IP address
#provinceProvinceTextThe user's province, generated from the IP address
#cityCityTextThe user's city, generated from the IP address
#os_versionOS VersionTextiOS 11.2.2, Android 8.0.0, etc.

#manufacturer

Device manufacturer

TextManufacturer of the user's device, such as Apple and vivo
#osOSTextSuch as Android and iOS

#device_id

Device IDTextUser's device ID: IDFV or UUID on iOS, androidID on Android
#app_versionApp versionTextThe version of your app
#bundle_idUnique app identifierTextApp package name or process name

#lib

SDK type

TextThe type of SDK you integrated, such as Android and iOS
#lib_versionSDK versionTextThe version of the SDK you integrated

#zone_offset

Time Zone Offset

NumericOffset in hours of the data time relative to UTC
#install_timeApp install timeTimeTime when the user installed the app; the value comes from the system

#system_language

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

2. Other preset properties​

In addition to the preset properties above, some preset properties are recorded only after you call the corresponding APIs:

Property nameDisplay nameProperty typeDescription
#duration

Event duration

NumericRequires calling the timing function timeEvent:. Records how long the event lasts, in seconds
#background_duration

Background duration

NumericRequires calling the timing function timeEvent. Records how long the app stays in the background during the event, in seconds

3. Get preset properties​

You can call the getPresetProperties method 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.

//Get the property object
TDPresetProperties *presetProperties = [TDAnalytics getPresetProperties];

//Generate event preset properties
NSDictionary *properties = [presetProperties toEventPresetProperties];
/*
{
"#os": "OSX",
"#device_id": "A8B1C00B-A6AC-4856-8538-0FBC642C1BAD",
"#bundle_id": "com.sw.thinkingdatademo",
"#manufacturer": "Apple",
"#system_language": "zh",
"#os_version": "10",
"#zone_offset": 8,
"#app_version":"1.0.0"
}
*/

//Get a specific preset property
NSString *bundle_id = presetProperties.bundle_id;//Package name
NSString *os = presetProperties.os;//OS type, such as OSX
NSString *system_language = presetProperties.system_language;//System language
NSString *os_version = presetProperties.os_version;//OS version
NSNumber *zone_offset = presetProperties.zone_offset;//Time zone offset

IP address, country, and city information is parsed and generated on the server side. The client doesn't provide APIs to get these properties

Was this page helpful?