Skip to main content

Preset properties

Last updated 10/07/2026

1. Preset properties for all events​

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

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_idDevice IDTextThe user's device ID
#screen_heightScreen heightNumericScreen height of the user's device, such as 1920
#screen_widthScreen widthNumericScreen height of the user's device, such as 1080

#lib

SDK type

Text

The type of SDK you integrated, such as JavaScript

#lib_versionSDK versionTextThe version of the SDK you integrated
#osOSTextSuch as Android and iOS
#browserBrowser typeTextType of browser the user uses, such as Chrome and Firefox
#browser_versionBrowser Version

Text

Version of the browser the user uses, such as Chrome 61.0 and Firefox 57.0
#zone_offsetTime Zone OffsetNumericOffset in hours of the data time relative to UTC
#system_languageSystem languageTextLanguage set in the user's system

#ua

User agent

Text

Used to identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language, browser plugins, etc. that the client uses.

#utm

Campaign source properties

TextAd information about where the user came from, including the ad source, ad medium, and more

2. Preset properties of auto-tracked events​

Property nameDisplay nameProperty typeDescription
#urlPage URLTextURL of the current page
#url_pathPage pathTextPath of the current page
#referrerReferrer URLTextURL of the page before the jump
#referrer_hostReferrer domainTextDomain of the page before the jump
#titlePage TitleTextTitle of the current page

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 = ta.getPresetProperties();

//Generate event preset properties
var properties = presetProperties.toEventPresetProperties();
/*
{
"#os":"Mac OS X",
"#screen_width":1920,
"#screen_height":1080,
"#browser":"chrome",
"#browser_version":"91.0.4472.114",
"#device_id":"17a3858fafd9b4-0693d07132e2d1-34657600-2073600-17a3858fafea9b",
"#zone_offset":8
}
*/

//Get a specific preset property
var os = presetProperties.os;//OS type, such as Android
var screenWidth = presetProperties.screenWidth;//Screen width
var screenHeight = presetProperties.screenHeight;//Screen height
var browser = presetProperties.browser;//Browser type
var browserVersion = presetProperties.browserVersion;//Browser version
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

4. Disable preset property collection​

In some scenarios, for compliance or business reasons, you may want to disable the collection of certain preset properties. You can pass the disablePresetProperties field during initialization. Its type is Array, and the preset properties corresponding to the fields you add are not uploaded. For example, to block preset properties such as "#os", "#lib", "#lib_version", "#url", and "#url_path", configure as follows:

var config = {
appId: "APP_ID",
serverUrl: "https://YOUR_SERVER_URL/sync_js",
batch:true,
autoTrack: {
pageShow: true,
pageHide: true,
},
disablePresetProperties:['#os','#lib_version','#lib','#screen_height','#screen_width','#browser','#browser_version',
'#system_language','#ua','#utm','#referrer','#referrer_host','#url','#url_path','#title','#element_type']
};
window.ta = thinkingdata;
ta.init(config);

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?