1. Predefined Events

Event English Variable NameEvent Display NameProperty English Variable NameEvent Property Display NameProperty Value TypeProperty Value Example or DescriptionTrigger TimingRemarks
$MPLaunchMini Program Launch
$Preset Properties

When the mini program is killed and reopened, and sa.quick('appLaunch', options) is called in the corresponding mini program lifecycle function, it will be triggered

General collection of Mini Program SDK, automatically collected when the autoTrack interface is opened

Refer to the Mini Program SDK: https://manual.sensorsdata.cn/sa/latest/tech_sdk_client_mp_qq-7537366.html
$sceneStartup SceneString
$url_pathPage PathString
$is_first_timeWhether First TimeBOOL
$utm_sourceStringAdvertising Campaign Source
$utm_mediumStringAdvertising Campaign Medium
$utm_termStringAd Campaign Keywords
$utm_contentStringAd Campaign Content
$utm_campaignStringAd Campaign Name
$MPShowMini Program Show
$Preset Properties

The Mini Program is launched, or it is displayed from the background to the foreground and calls sa.quick('appShow', options) in the corresponding mini program lifecycle function

$sceneLaunch SceneString
$url_pathPage PathString
$utm_sourceStringAdvertising Campaign Source
$utm_mediumStringAdvertising Campaign Medium
$utm_termStringAdvertising Campaign Term
$utm_contentStringAdvertising Campaign Content
$utm_campaignStringCampaign Name
$MPHideMiniprogram Goes to Background
$Preset Properties

When clicking the exit button in the upper right corner of the miniprogram, entering the background on QQ, entering the about page of the miniprogram, locking the phone screen, and the miniprogram process being killed and the sa.quick('Hide') is called in the corresponding miniprogram lifecycle function

$url_pathPage PathString
$event_durationEvent DurationNumericThe time from $MPShow to $MPHide, when the miniprogram goes to background or is closed
$MPViewScreenMini Program Page View
$Preset Properties
Triggered when a Mini Program page is opened, opened within the Mini Program, or opened from the background to the foregroundCalled every time a page is openedRequires v0.5.0 and later versions
$url_pathPage PathString
$MPClickMini Program Element Click
$Preset Properties
Triggered when an element in a Mini Program page is clickedOnly collected when a clicked element has a bindtap/bindlongtap/bindlongpress listener attached
$element_idElement IDString
$element_nameElement NameString
$element_contentElement ContentString
$element_typeElement TypeString
$url_pathPage PathString

2. Predefined properties for all events

Field NameTypeDescriptionRemark
$libStringSDK TypeThe value of QQ Mini in the QQ Mini Program SDK
$lib_versionStringSDK Version
$app_idStringApp ID of QQ Mini ProgramSupported in version 0.6.0 and above
$screen_heightNumberScreen height
$screen_widthNumberScreen Width
$modelStringDevice Model
$manufacturerStringDevice Manufacturer
$osStringOperating System
$os_versionStringOperating System Version
$is_first_dayBooleanWhether it is the first day of visit (the value is true from the first visit of a new user to midnight between the first day and the next day, and false afterwards, indicating its existence in storage)
$is_login_idBooleanIs it a login ID (determined and added when data is stored)
$ipStringAttributes carried when the SDK sends data requests
$timezone_offsetNumberTimezone offsetSupported in version 0.6.0 and above
$countryStringResolved from IP
$provinceStringResolved from IP
$cityStringObtained from IP resolution
$network_typeStringNetwork type
$browserStringBrowser name, obtained from UA
$browser_versionStringBrowser version, obtained from UA
$latest_utm_sourceStringThe most recent paid advertising campaign source, with the value from the most recent advertising campaign source.
$latest_utm_mediumStringThe last paid campaign medium is the most recent paid campaign medium.
$latest_utm_termStringThe value of the most recent paid campaign term is the value of the most recent valuable campaign term.
$latest_utm_contentStringThe last paid campaign content is the value of the last valuable campaign content.
$latest_utm_campaignStringName of the most recent paid campaign. The value is the name of the most recent paid campaign
$latest_sceneStringLast launched scene value in recent time.


3. Preset user attribute

Property NameProperty TypeDefault Display NameDescriptionRemark
$first_visit_timeTimeFirst Visit TimeAssigned to this property when new users first visit the mini program.Because these properties are set when new users first visit the mini program, they are generally used to track user behavior with anonymous ID. If the association between login ID and anonymous ID fails, the login ID will not have these property values.
$utm_sourceStringFirst Ad Campaign Source

These user properties are collected only when new users first visit the mini program using the mini program channel tracking, and when they access through a channel with utm parameters. If the users are existing users, even if they access the mini program through a channel, these user properties will not be set. For the identification of new and existing users, please refer to this document: New User and First-day First-time Marking

$utm_mediumStringFirst Ad Campaign Medium
$utm_termStringFirst Ad Campaign Term
$utm_contentStringFirst ad campaign content
$utm_campaignStringFirst ad campaign name