目录
此内容是否有帮助?

# Preset Properties

# 1. Preset Properties of All Events

All Events in iOS SDK(including auto-tracking events) would have the following preset property.

# 2. Preset Properties of Auto-tracking Event

The following preset properties are the properties set specially for each auto-tracking event

  • Preset properties of APP start event (ta_app_start)
Property name Display name Property type Instruction
#resume_from_background
Resume from the background or not
Bool
Indicating whether the APP is enabled by the user or resumed from the background. If the value is true, it means the APP is resumed from the background; if the value is false, it means the APP is enabled by the user directly.
#start_reason
APP enable source
Text
Displays the reason for APP starting, and the value is string. Currently supports favorite
deeplink
, push, 3dtouch start reason.
For the sample, please refer to:
{url:"thinkingdata://","data":{}}
#background_duration
Background duration
Numeric value
Record the background duration of the APP in the time interval between two start events (Unit: second)
  • Preset properties of APP end event (ta_app_end)
Property name Display name Property type Instruction
#duration
Event duration
Numeric value
Indicating the duration of the APP access (Unit: second).
  • Preset properties of APP view screen event (ta_app_view)
Property name Display name Property type Instruction
#title
Screen title
Text
Title of the ViewController, to be set by invoking
controller.navigationItem.title
.
#screen_name
Screen name
Text
Class name of ViewController.
#url
Screen URL
Text
The url of current screen, to be set by
invoking
getScreenUrl
#referrer
Forward address
Text
The address of the screen before skipping, to be set by invoking
getScreenUrl
  • Preset properties of APP control(view) click event
Property name Display name Property type Instruction
#title
Screen title
Text
Title of the
ViewController
, to be set by invoking
controller.navigationItem.title
.
#screen_name
Screen name
Text
Class name of
ViewController
.
#element_id
Element ID
Text
The ID of
the
UIView
. e.g.
button.thinkingAnalyticsViewID
#element_type
Element type
Text
Type of the
UIView
#element_selector
Element selector
Text
Splicing of the
viewPath
of the
UIView
#element_position
Element position
Text
UIView
position information that exists only if the control type is
UITableView
or
UICollectionView
.
The value is
Section
,
Row
.
#element_content
Element content
Text
Content on the
UIView
  • Preset properties of APP crash event (ta_app_crash)

# 3. Other Preset Properties

In addition to the Preset properties above, some preset properties would only be recorded after corresponding API is called:

Property name Display name Property type Instruction
#duration
Event duration
Numeric value
Timing function
timeEvent
should be invoked to record the event duration (Unit: second)
#background_duration
Background duration

N
umeric value
Timing function
timeEvent
should be called to record the background duration within an event interval (Unit: second)

# Getting Preset Properties

When some preset properties of the APP is required for Server data tracking, this method can be invoked to get the preset properties of the App side and then send them to the server

IP, nation and city information are parsed and generated by the server. The client shall not provide the interface to get such properties

# 5. Disable preset property tracking

Under certain scenarios, you may want to forbid tracking certain preset properties to ensure compliance and meet actual business requirements. Add TDDisPresetProperties field of array type in the info.plist, Add the prefab properties that not allowed to be tracked to this field. e.g. "#fps", @"#ram", @"#disk", @"#start_reason", @"#simulator", the configuration is as follows: