Skip to main content

Preset properties

Last updated 10/05/2026

1. Preset properties carried by all events​

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

Property nameDisplay nameProperty typeWhen collectedDescription
#ipIP addressText

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_codeCountry 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
#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 initializationThe OS version number, such as 15.6.1
#manufacturerDevice manufacturerTextCollected once at initializationManufacturer of the user's device, such as Apple
#osOSTextCollected once at initializationSuch as iOS

#device_id

Device ID

TextCollected once at initializationThe user's device ID. On iOS, the user's IDFV or UUID is used
#device_typeDevice TypeTextCollected once at initializationDevice type, such as iPhone and iPad
#screen_heightScreen heightNumericCollected once at initializationScreen height of the user's device, such as 667
#screen_widthScreen widthNumericCollected once at initializationScreen width of the user's device, such as 375
#device_modelDevice modelTextCollected once at initializationModel of the user's device, such as iPhone12,8
#app_versionApp versionTextCollected once at initializationThe version of your app
#bundle_idUnique app identifierTextCollected once at initializationBundle name

#lib

SDK type

Text

Collected when the event occurs

The type of SDK you integrated, such as Android and iOS
#lib_versionSDK versionTextCollected when the event occursThe version of the SDK you integrated

#network_type

Network 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. This field is not collected on iOS 16.4 and later

#zone_offset

Time Zone Offset

NumericCollected when the event occursOffset 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

#simulatorWhether it is a simulatorBooleanCollected once at initializationWhether the device is a simulator: true/false

#ram

Device memory status

Text

Collected when the event occurs

Current available memory and total memory of the user's device in GB, such as 1.4/2.4

#disk

Device storage statusTextCollected when the event occursCurrent available storage and total storage of the user's device in GB, such as 30/200

#fps

Device FPS

Numeric

Collected when the event occurs

Current frame rate (frames per second) of the user's device, such as 60 (not collected by default in SDK v3.2.0 and later)

#system_language

System languageTextCollected when the event occursSystem language of the user's device (ISO 639-1, that is, two lowercase letters), such as zh and en
#relaunched_in_backgroundWhether the app is in the backgroundBooleanCollected when the event occurs

When the APP is launched in the background, this property is YES in the collected events.

When the APP is launched normally, the collected events don't contain this property.

2. Preset properties of auto-tracked events​

The following preset properties are specific to each auto-tracked event

  • Preset properties of the APP start event (ta_app_start)
Property nameDisplay nameProperty typeDescription
#resume_from_background

Resumed from background

BooleanIndicates whether the APP was opened or woken from the background. true means it was woken from the background, and false means it was opened directly

#start_reason

Launch reason

TextThe reason the APP was launched, as a JSON string. Currently, deeplink, push, and 3D Touch launch reasons can be collected. Sample data: {url:"thinkingdata://","data":{}}

#background_duration

Background duration

Number

How long the app stays in the background between two start events, in seconds
  • Preset properties of the APP end event (ta_app_end)
Property nameDisplay nameProperty typeDescription
#durationEvent durationNumericThe duration of this APP visit (from start to end), in seconds
  • Preset properties of the APP view page event (ta_app_view)
Property nameDisplay nameProperty typeDescription

#title

Page Title

TextThe title of the View Controller, whose value is the value of the controller.navigationItem.title property
#screen_namePage nameTextThe class name of the View Controller

#url

Page URL

TextThe URL of the current page. Call getScreenUrl to set the URL

#referrer

Referrer URL

TextThe URL of the page before the jump. That page must call getScreenUrl to set the URL
  • Preset properties of the APP control click event (ta_app_click)
Property nameDisplay nameProperty typeDescription
#titlePage Title

Text

The title of the View Controller, whose value is the value of the controller.navigationItem.title property
#screen_namePage nameTextThe class name of the View Controller

#element_id

Element ID

TextThe ID of the control, which must be set with thinkingAnalyticsViewID
#element_typeElement typeTextThe type of the control
#element_selectorElement selectorTextThe concatenation of the control's viewPath

#element_position

Element positionPosition of the control. Exists only when the control type is UITableView or UICollectionView, and indicates the position where the control was clicked. The value is section number(Section):row number(Row)
#element_contentElement contentTextThe content on the control
  • Preset properties of the APP crash event (ta_app_crash)
Property nameDisplay nameProperty typeDescription
#app_crashed_reasonException informationTextString. Records the stack trace at the time of the crash

3. 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

4. Get preset properties​

In v2.7.0 and later, 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.

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

//Generate event preset properties
NSDictionary *properties = [presetProperties toEventPresetProperties];
/*
{
"#carrier": "中国电信",
"#os": "iOS",
"#device_id": "A8B1C00B-A6AC-4856-8538-0FBC642C1BAD",
"#screen_height": 2264,
"#bundle_id": "com.sw.thinkingdatademo",
"#manufacturer": "Apple",
"#device_model": "iPhone7",
"#screen_width": 1080,
"#system_language": "zh",
"#os_version": "10",
"#network_type": "WIFI",
"#zone_offset": 8,
}
*/

//Get a specific preset property
NSString *bundle_id = presetProperties.bundle_id;//Package name
NSString *os = presetProperties.os;//OS type, such as iOS
NSString *system_language = presetProperties.system_language;//Phone system language
NSNumber *screen_width = presetProperties.screen_width;//Screen width
NSNumber *screen_height = presetProperties.screen_height;//Screen height
NSString *device_model = presetProperties.device_model;//Device model
NSString *device_id = presetProperties.device_id;//Unique device identifier
NSString *carrier = presetProperties.carrier;//Carrier of the phone's SIM card; on dual-SIM phones, the carrier of the primary SIM card is used
NSString *manufacture = presetProperties.manufacturer;//Phone manufacturer, such as Apple
NSString *network_type = presetProperties.network_type;//Network type
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

5. Disable preset property collection​

In some scenarios, for compliance or business reasons, you may want to stop collecting certain preset properties. You can add the TDDisPresetProperties field of type Array to the info.plist file of your project. The preset properties that correspond to the added fields are not uploaded. For example, to block preset properties such as @"#fps", @"#ram", @"#disk", @"#start_reason", and @"#simulator", configure them as shown in the following figure:

If you block the device ID and need to use first events, make sure you set the first_check_id property

Was this page helpful?