1. Pre-set events

Event English variable nameEvent display nameProperty English variable nameEvent property display nameProperty value typeTrigger timingDescriptionRemarks
$MPLaunchMini Program Launch
$Pre-set properties
When the Mini Program process is killed, reopened, and sa.appLaunch() is called in the corresponding Mini Program lifecycle function, it will be triggeredTriggered only once when the Mini Program is initialized
$url_pathPage pathString
$is_first_timeWhether it is the first timeBoolean value
$MPShowMini program show
$Predefined Attribute
When the mini program is launched, or it enters the foreground from the background and the corresponding mini program lifecycle function sa.appShow() is calledWhen the mini program is launched
$url_pathPage pathString
$MPHideMini program enters the background
$Predefined Attribute
When the "Exit" button in the upper right corner of the mini-program is clicked, Huawei WeLink enters the background, enters the about page of the mini-program, the mobile phone screen is locked, and the mini-program process is killed and the sa.appHide() is called in the corresponding mini-program lifecycle function, the trigger is triggeredMini-program enters the background from the foreground
$url_pathPage pathString
$MPViewScreenMini-program page view
$preset_property
Triggered when the mini-program is launched and opens a page, opens a page within the mini-program, or opens a page when entering the foreground from the backgroundCalled every time a page is opened


$url_pathPage pathString

2. Common preset properties for all events

Field nameTypeExplanationNotes
$libStringSDK TypeThe value of WeCode Mini Program SDK is WeCode
$lib_versionStringSDK Version
$app_idStringMini Program's AppID
$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 until midnight between the first day and subsequent days, and then becomes false, indicating its presence in the storage)
$is_login_idBooleanWhether it is a login ID (determined and added when the data is stored)
$timezone_offsetNumericTimezone offset
$network_typeStringUser Network Type
$urlStringPage URL
$browserStringBrowser Name, parsed from the user agent string
$browser_versionStringBrowser Version, parsed from the user agent string