1. Presets Events

English Variable NameEvent Display NameEnglish Variable Name of PropertyProperty Display Name of EventType of Property ValueExample or Description of Property ValueTrigger TimingDescriptionCorresponding Lifecycle
$MPLaunchMini Program Launch
$Preset Properties

Triggered when the mini program is launched after being killed and reopened, and sa.quick('appLaunch', options) is called in the corresponding mini program lifecycle function

Triggered once when the mini program initialization is completed






App.onLaunch
$sceneLaunch SceneString
$url_pathPage PathString
$is_first_timeIs First TimeBoolean
$utm_sourceAdvertising Campaign SourceStringVersion 0.8 and above
$utm_mediumAdvertising Campaign MediumString0.8 and above versions
$utm_termAd Campaign KeywordsString0.8 and above versions
$utm_contentAd Campaign ContentString0.8 and above versions
$utm_campaignAd Campaign NameString0.8 and above versions
$MPShowMini Program Display
$predefined property

Mini program start, or enter the foreground from the background and call sa.quick('appShow', options) in the corresponding mini program lifecycle function.Launching Mini Program

App.onShow

$sceneLaunch SceneString
$url_pathPage PathString
$utm_sourceAd Campaign SourceStringVersion 0.8 and above
$utm_mediumAd Campaign MediumStringVersion 0.8 and above
$utm_termAdvertising Campaign TermStringVersion 0.8 and above
$utm_contentAdvertising Campaign ContentStringVersion 0.8 and above
$utm_campaignAdvertising Campaign NameStringVersion 0.8 and above
$MPHideOn Mini Program Background
$Predefined Property

Triggered when clicking the exit button at the top right corner of the miniprogram, related app goes into the background, entering the "About" page of the miniprogram, phone screen locked, and when the miniprogram process is killed and sa.quick('Hide') is called in the corresponding miniprogram lifecycle function.Miniprogram goes from foreground to backgroundApp.onHide
$event_durationUser Dwell TimeValueThe time from $MPShow to $MPHide when the Mini Program is sent to the background or closed
$url_pathPage pathString


2. Predefined properties for all events

Field NameTypeDescriptionRemarks
$libStringSDK TypeThe value for Xiaohongshu Mini Program SDK is XHSMini
$lib_versionStringSDK Version
$app_idStringMini Program AppID for XiaohongshuNeed to pass appid when initializing the SDK by calling the init method
$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 (true for values between the first visit of a new user and midnight, false afterwards, indicating it is stored in storage)
$is_login_idBooleanWhether it is a login ID (determined and added during data storage)
$ipStringProperty carried in SDK data request
$timezone_offsetNumericTimezone offsetVersion 0.8 and above
$countryStringObtained by IP resolution
$provinceStringObtained by IP resolution
$cityStringObtained by IP resolution
$network_typeStringNetwork type
$browserStringBrowser name parsed from UA
$browser_versionStringBrowser version parsed from UA
$latest_utm_sourceStringLatest paid advertising campaign source0.8 and above versions
$latest_utm_mediumStringLatest paid advertising campaign medium0.8 and above versions
$latest_utm_termStringLatest paid advertising campaign termVersion 0.8 and above
$latest_utm_contentStringLatest paid advertising campaign contentVersion 0.8 and above
$latest_utm_campaignStringLatest paid advertising campaign nameVersion 0.8 and above
$latest_sceneStringLatest launch scene value0.8 and above