Skip to main content

Preset properties

Last updated 10/03/2026

1. Preset properties carried by all events​

Preset properties collected on different platforms vary to some extent. For details, see the following documents: Android platform, iOS platform

Preset properties carried by all events on mini game platforms:

Property nameDisplay nameProperty typeDescription
#ipIP 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_codeCountry codeTextThe 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
#device_modelDevice modelTextModel of the user's device, such as iPhone 8
#device_idDevice IDTextThe user's device ID, which is the UUID generated during initialization
#screen_heightScreen heightNumericScreen height of the user's device, such as 1920
#screen_widthScreen widthNumericScreen height of the user's device, such as 1080
#manufacturerDevice manufacturerTextManufacturer of the user's device, such as Apple and vivo
#os_versionOS VersionTextiOS 11.2.2, Android 8.0.0, etc.
#osOSTextSuch as Android and iOS
#network_typeNetwork status

Text

Network status when the event is uploaded, such as WIFI, 3G, and 4G
#libSDK typeTextThe type of SDK you integrated, such as MG (mini game)
#lib_versionSDK versionTextThe version of the SDK you integrated
#sceneScene valueNumericThe scene value passed in when the WeChat mini game launches
#mp_platformMini game platformTextIdentifies the platform where the app runs
#zone_offsetTime Zone OffsetNumericOffset in hours of the data time relative to UTC

2. Preset properties of auto-tracked events​

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

  • Preset properties of mini program launch (ta_mp_show)
Property nameDisplay nameProperty typeDescription
#url_pathPage pathTextPath of the page displayed when the mini program launches

#start_reason

Launch reasonTextA JSON string; the parameter obtained from the getLaunchOptionsSync API
  • Preset properties of mini game hide (ta_mg_hide)
Property nameDisplay nameProperty typeDescription

#duration

Event duration

NumericThe duration from this launch ta_mg_show to the hide ta_mg_hide, in seconds

3. Get preset properties​

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

//Get the property object
TDAnalytics.getPresetPropertiesAsync((presetProperties)=>{
//Generate event preset properties
var properties = presetProperties.toEventPresetProperties();
/*
{
"#device_model":"iPhone 5",
"#device_id":"3204487163-1624513721217",
"#screen_width":320,
"#screen_height":568,
"#os":"iOS",
"#os_version":"10.0.1",
"#network_type":"wifi",
"#zone_offset":8,
"#manufacturer":"Apple"
}
*/
//Get a specific preset property
var os=presetProperties.os;//OS type, such as Android
var osVersion=presetProperties.osVersion;//OS version
var networkType=presetProperties.networkType;//Network type
var manufacture=presetProperties.manufacturer;//Device manufacturer
var deviceModel=presetProperties.deviceModel;//Device model
var screenWidth=presetProperties.screenWidth;//Screen width
var screenHeight=presetProperties.screenHeight;//Screen height
var deviceId=presetProperties.deviceId;//Device ID
var zoneOffset=presetProperties.zoneOffset;//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?