1. Preset Events

Event English Variable NameEvent Display NameProperty English Variable NameEvent Property Display NameProperty Value TypeProperty Value Example or DescriptionTrigger TimingRemarks
$pageviewWeb Browsing Page
$preset_properties

Automatically collected when a page is opened, reported based on the triggering of autoTrack, the triggering timing can be customized, it is generally recommended to be executed immediately after initializing the SensorsData SDK.JS SDK general collection, it will be automatically collected after opening the autoTrack interface, reference documentation: JS SDK

https://www.sensorsdata.cn/manual/js_sdk.html



UTM advertising campaign parameters, which can be used for channel tracking, reference documentation:

https://manual.sensorsdata.cn/sa/latest/channel_tracking-22258121.html
$is_first_timeIs First TimeBoolean ValueWhen a new user visits a page for the first time, the first $pageview event triggered has the value of true, and subsequent $pageview events have the value of false.
$url_pathPage pathString
$referrer_hostReferring domainStringIf the page is opened directly, the value is an empty string
$referrerReferring addressStringIf the page is opened directly, the value is an empty string
$utm_campaignAdvertising campaign nameStringCollected if the opened page has this parameter in the URL
$utm_sourceAdvertising campaign sourceStringIf the url opened by the user has this parameter, it will be collected
$utm_mediumAdvertising campaign mediumStringIf the URL of the page being opened has this parameter, it will be collected
$utm_termAdvertising campaign termStringIf the URL of the page being opened has this parameter, it will be collected
$utm_contentAdvertising campaign contentStringIf the URL of the page being opened has this parameter, it will be collected
$WebClickWeb element click
$predefined_property

Automatic collection when clicking an element/control/button (expandable)JS SDK universal collection, automatic collection when opening the autoTrack interface, see documentation: Full Tracking (Web)
$element_idElement IDStringElements are only collected if they have an id attribute
$element_contentElement contentStringText between element tags directly, for example: <a><span>Submit</span></a>, the collected value is "Submit"
$element_nameElement nameStringElements are only collected if they have a name attribute
$element_class_nameElement class nameStringElements are only collected if they have a class attribute
$element_typeElement typeStringDefault collection
$element_selectorElement selectorStringDefault collection
$element_target_urlElement link addressStringDefault collection for "a" tags
$url_pathPage pathString
$element_pathDOM tree structure node after the bodyStringDefault collection. The element is taken from the nearest root path with an id, and if none of the root paths have an id, it takes the concatenation of all paths with '>' in between. If the element has an id name, '#' is added after the element type.
$element_positionElement Leaf Node IndexStringThe li label of the page and the child labels in the li label (that is, the leaf node is the li label or the parent node of the leaf node or the parent node is the li label) are collected.
$page_x

Click the distance to the left of the page

Numerical valueVersion 1.21.5 starts collecting $page_x and $page_y.
$page_yClick the distance from the top of the pageNumerical value
$WebStayWeb view area stay
$Preset properties

Effective stay: focus on the page area does not scroll, during which the mouse can move, click and other operations.

Valid residence time: The residence time exceeds the specified time, which is 4 seconds by default in the javascript sdk (parameters can be set).

The javascript sdk sends a page stay event if a page scroll occurs and the previous page stay is valid, that is, longer than the default 4 seconds or a custom time.
This event needs to be captured in order to use the thermal map-reachability diagram function of the Sensors Analytics. Event trigger condition: Stay on a page for more than 4 seconds and make an effective swipe to trigger. Adding custom attributes is not supported
$viewport_widthVisual widthNumerical valueViewport Width (The width of the current browser's viewport, measured in pixels.)
$viewport_positionViewport Position from TopNumericViewport Position from Top (The position of the current scroll bar, measured from the top of the page, in pixels.)
$viewport_heightViewport HeightNumericViewport Height (The height of the current browser's viewport, measured in pixels.)
$event_durationEvent DurationNumericTime interval since the last trigger of the scroll event. If there is no action on the page, the event is triggered once every 4 seconds when scrolling the page. If there is scrolling on the page, the duration is reset to zero.
$url_pathPage PathString
$WebPageLeaveWeb Page Browsing Duration
$Preset attribute

The "active state switch" of the page (losing focus/gaining focus, switching window minimization, switching browser tab, computer sleep and wake up) and "leave" (closing window, page jump, refresh, browser forward and backward) trigger the $WebPageLeave event in the lifecycle, where event_duration refers to the duration of page browsing.See detailed configuration
$url_pathPage pathString
$referrer_hostForward domain nameStringIf the page is opened directly, the value is an empty string.
$referrerForward addressStringIf the page is opened directly, the value is an empty string.
$event_durationBrowsing durationNumericUser browsing duration, in seconds
$viewport_positionPosition of the viewport from the topValueCollected starting from version 1.21.5. Position of the viewport from the top (current scroll position, height from the top of the page, in pixels.)Supported since version 1.21.5
$WebPageLoadWeb page load time
$PredefinedProperties

Calculates the page load time using the performance API, listens for the page to finish loading, and triggers the $WebPageLoad event.See detailed configuration
$url_pathPage pathString
$referrer_hostReferring domainStringIf the page is directly opened, the value is an empty string
$referrerReferring URLStringIf the page is directly opened, the value is an empty string
$event_durationEvent durationNumberPage loading duration in seconds

$page_resource_size

Page resource sizeNumberStarting from version 1.21.7, the page resource size is collected in kilobytes (kb). The size should be greater than 0 and less than 10GB. If it does not meet the requirements, it will not be collected.

2. Default attributes for all events

Attribute nameAttribute typeDefault display nameDescriptionNotes
$libStringSDK TypeSDK Type
$lib_versionStringSDK VersionSDK Version
$lib_methodStringTracking MethodTracking Method, currently the value is unified as "code"
$screen_heightNumberScreen HeightScreen Height, collected in pixels
$screen_widthNumericScreen WidthScreen width, measured in pixels
$url_hostStringPage address domainParsed by the server. If $url is reported in the event, this property will be parsed from it
$is_first_dayBooleanWhether it is the first day of visitIndicates whether it is the first day an event is triggered. Please refer to New User and First Day First Time MarkingSupported in version 1.5
$is_login_idBoolean

Whether it is a login ID

Determined during data storage
$ipStringIPBackend parsing from HTTP request
$timezone_offsetNumberTimezone offsetObtained directly from the browser's time objectSupported in version 1.15.9
$countryStringCountry

Resolved from IP


$provinceStringProvince
$cityStringCity
$latest_referrerStringLast external address

Reset as long as the forward domain is not the current page domain

Supported in version 1.6
$latest_referrer_hostStringLast external domainVersion 1.14.8 and above, not collected by default, need to be manually set preset_properties Detailed configuration reference

Supported in version 1.6
$latest_landing_pageStringLast landing page
$latest_utm_sourceStringLast ad campaign source



After using Web Channel Track , once the URL contains corresponding channel information (utm_ parameters), it will be reset.

Version 1.6 is supported.

$latest_utm_termStringLatest ad campaign term
$latest_utm_contentStringLatest ad campaign content
$latest_utm_campaignStringLatest ad campaign name
$latest_utm_mediumStringLatest ad campaign medium
$latest_search_keywordStringSearch engine keywordDue to different strategies implemented by various search engines, there might be cases in which the keyword cannot be acquired.Supported in version 1.8
$latest_traffic_source_typeStringLatest Traffic Source Type

Refer to the document for the value rule Explanation of Traffic Source Type

Supported in version 1.8
$urlStringPage URL
In version 1.16.5, $title and $url are set as properties for all events
$titleStringPage Title
$viewport_widthNumberViewport WidthViewport Width (The width of the visible area of the current browser, in pixels)In version 1.21.5, $viewport_width and $viewport_height are set as properties for all events
$viewport_heightNumericViewport HeightViewport Height (the height of the visible area of the current browser, in pixels.)
$page_heightNumericPage Height
Version 1.21.5 integrated Page Height Plugin will collect this property.

Note:
(1) The search engine keyword, $latest_search_keyword, may not be collected due to different strategies of each search engine.
(2) The attribute value of $latest_traffic_source_type includes: paid advertising traffic, organic search traffic, social media traffic, referral traffic, direct traffic.
(3) The latest paid advertising related parameters are event attributes and do not need to be configured. They will exist in all events. This attribute will save the most recent valid utm_source.

3. Preset properties related to UserAgent

These properties are parsed from the UserAgent of the browser.

Field NameTypeDescriptionSDK Version
$manufacturerStringDevice Manufacturerv1.6 and above support new parsing method
$modelstringdevice model
$osstringoperating system
$os_versionstringoperating system version
$browserstringbrowser name
$browser_versionstringbrowser version
$bot_nameStringSpider Name

Currently, it is determined by UA and has a default property $bot_name (Spider Name). However, there are two situations that cannot be determined:
Firstly, if the UA does not indicate and the illegal spider triggers JS scripts.
Secondly, if the spider does not trigger JS scripts, it will not trigger our SDK, so it won't be counted in the statistics.
For spider types, the parsing of mainstream spider names is already supported. However, for newly added or other niche types of spiders, there may be cases where they cannot be parsed.

4. Preset User Properties

Property NameProperty TypeDefault Display NameDescriptionRemarks
$first_visit_timeTimeFirst Visit TimeWhen a new user first visits the webpage, this property will be assigned a value.Because the setting time of these properties is when a new user first visits the webpage, these properties will only be set for new users who are generally identified by anonymous ID for user behavior tracking. If the association between the login ID and the anonymous ID fails, the login ID will not have these property values.




$utm_sourceStringFirst Campaign Source



Use Web Channel Track and collect these user attributes only when new users visit for the first time through the channel with utm parameters. Even if old users access the webpage through the channel, these user attributes will not be set. The marking of new and old users can be referred to in this document: New Users and First-day First-time Mark

$utm_mediumStringFirst Campaign Medium
$utm_termStringFirst Campaign Term
$utm_contentStringFirst Campaign Content
$utm_campaignStringFirst Campaign Name
$first_referrerStringFirst ReferrerThe forward address when a new user first comes to the page with the Sensors Analytics SDK.
$first_referrer_hostStringFirst Forward Domain NameThe forward page domain name when the user uses the SDK for the first time
$first_browser_languageStringFirst used browser languageThe browser language when the new user first visits the SDK page
$first_browser_charsetStringFirst used browser character setSDK 1.8 and above supported, the browser character set when the new user first visits the SDK page
$first_search_keywordStringFirst search engine keywordSDK 1.8 and above supported
$first_traffic_source_typeStringFirst traffic source typeSDK 1.8 and above supported, the attribute values include: paid advertising traffic, organic search traffic, social media traffic, referral traffic, direct traffic.



5. Channel Tracking Related Predefined Events and Predefined Properties

Event English NameEvent Display NameProperty English NameProperty Display NameProperty Value TypeDescriptionTrigger Occasion
$ChannelLinkReachingChannel Link Reaching
$Predefined Properties

When users click on a channel link to reach the landing page, this event and event properties will be collected.
$first_channel_keyword_idFirst Channel Keyword IDStringFirst Channel Keyword ID
$channel_keyword_idChannel Keyword IDStringChannel Keyword ID



6. Preset Events and Properties for A/B Testing

Event English NameEvent Display NameProperty English NameProperty Display NameProperty Value TypeDescriptionTrigger Timing

$ABTestTrigger

A/B Testing
$Preset Attribute

Hit experiment and collect this event as well as event properties

$abtest_experiment_id

Experiment IDStringExperiment ID

$abtest_experiment_group_id

Experiment Group IDStringExperiment Group ID


7. Predefined events and properties for pop-up

Event nameEvent display nameProperty nameProperty display nameProperty value typeDescriptionTrigger time
$PlanPopupDisplayPop-up display
Predefined attribute

Popup display, will collect this event and event attributes
$sf_plan_idOperational plan nameStringThe actual reported value is the ID, which will be mapped to the plan name with a dimension dictionary
$sf_plan_typePlan typeStringOperational plan, flow canvas, WeChat operation
$sf_channel_service_nameMessage send service providerString

SENSORS_FOCUS

$sf_channel_categoryMessage channel typeString

POPUP

$sf_audience_idUser IDStringUser ID, only exists when there are audience rules
$sf_plan_strategy_idExperimental Group IDStringProperty value 0 or -1, 0 represents strategy group, -1 represents control group
$sf_succeedMessage sent successfullyStringAttribute value true or false, true represents success, false represents failure
$sf_fail_reasonFailure reason for message sendingStringUnknown if the pop-up window is successful
$sf_msg_titlePush titleString
$sf_msg_contentPush ContentString
$sf_platform_tagPlatform Type TagStringANDRIOD, IOS, H5, WEB
$sf_msg_idPush Message IDString
$sf_lib_versionPopup SDK VersionStringVersion number of the Popup SDK
$sf_msg_image_urlImage URLStringImage URL (image CDN storage address)
$PlanPopupClickClick behavior
$Predefined Property

Popup click, collect this event and event attributes





















$sf_plan_idPlan NameStringActually reported is the ID, and there will be a dimension dictionary that maps to the plan name


$sf_plan_typePlan TypeStringOperating plan, process canvas, WeChat operation


$sf_channel_service_name

Messaging Service Provider

String

SENSORS_FOCUS



$sf_channel_category

Message Channel Type

String

POPUP



$sf_audience_id

Operational Audience ID

String

Audience ID, only exists when there are audience rules



$sf_plan_strategy_id

Experimental Group ID

String

0 or -1, 0 represents the experimental group, -1 represents the control group



$sf_msg_title

Push Title

String




$sf_msg_content

Push Content

String




$sf_msg_element_type

Popup Button Type

String

Popup element type: normal button, text link, image link, close icon, overlay



$sf_msg_element_content

Popup button text

String

Popup button text, exclusive to the button



$sf_msg_element_action

Popup button behavior

String

Popup click behavior: URL link, custom link, close popup



$sf_msg_image_url

Image URL

String

Image URL (image CDN storage address)



$sf_msg_action_idClick Behavior IDString


$sf_platform_tagPlatform Type TagStringANDROID, IOS, H5, WEB


$sf_msg_idPush Message IDString


$sf_close_type  Close Button TypeStringClosing button type, only closing actions available: close overlay, close icon at the top right of the pop-up, close icon at the bottom of the pop-up, bottom button (set as the button to close the pop-up)


$sf_lib_versionSDK version of the popupString