Skip to main content

Preset properties

Last updated 10/03/2026

1. Preset properties for all events​

The following preset properties are carried by all events on uni-app mini program platforms, including auto-tracked events

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_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_type

Network statusTextNetwork status when the event is uploaded, such as WIFI, 3G, and 4G

#lib

SDK typeTextThe type of SDK you integrated, such as MP (mini program) and MG (mini game)
#lib_versionSDK versionTextThe version of the SDK you integrated
#sceneScene valueNumericScene value passed in when the WeChat Mini Program starts
#mp_platformMini program platformTextIdentifies the platform where the app runs
#zone_offset

Time Zone Offset

NumericOffset in hours of the data time relative to UTC
#system_languageSystem languageTextSystem language of the user's device (ISO 639-1, that is, two lowercase letters), such as zh and en

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
  • Preset properties of mini program hide (ta_mp_hide)
Property nameDisplay nameProperty typeDescription
#duration

Event duration

NumericThe duration from this launch ta_mp_show to the hide ta_mp_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
var presetProperties=TDAnalytics.getPresetProperties();
//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?