Presets Events and Presets Properties of Xiaohongshu Mini Program SDK
|
Collect
1. Presets Events
English Variable Name | Event Display Name | English Variable Name of Property | Property Display Name of Event | Type of Property Value | Example or Description of Property Value | Trigger Timing | Description | Corresponding Lifecycle |
---|---|---|---|---|---|---|---|---|
$MPLaunch | Mini 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 | |||
$scene | Launch Scene | String | ||||||
$url_path | Page Path | String | ||||||
$is_first_time | Is First Time | Boolean | ||||||
$utm_source | Advertising Campaign Source | String | Version 0.8 and above | |||||
$utm_medium | Advertising Campaign Medium | String | 0.8 and above versions | |||||
$utm_term | Ad Campaign Keywords | String | 0.8 and above versions | |||||
$utm_content | Ad Campaign Content | String | 0.8 and above versions | |||||
$utm_campaign | Ad Campaign Name | String | 0.8 and above versions | |||||
$MPShow | Mini 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 | |||
$scene | Launch Scene | String | ||||||
$url_path | Page Path | String | ||||||
$utm_source | Ad Campaign Source | String | Version 0.8 and above | |||||
$utm_medium | Ad Campaign Medium | String | Version 0.8 and above | |||||
$utm_term | Advertising Campaign Term | String | Version 0.8 and above | |||||
$utm_content | Advertising Campaign Content | String | Version 0.8 and above | |||||
$utm_campaign | Advertising Campaign Name | String | Version 0.8 and above | |||||
$MPHide | On 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 background | App.onHide | |||
$event_duration | User Dwell Time | Value | The time from $MPShow to $MPHide when the Mini Program is sent to the background or closed | |||||
$url_path | Page path | String |
2. Predefined properties for all events
Field Name | Type | Description | Remarks |
---|---|---|---|
$lib | String | SDK Type | The value for Xiaohongshu Mini Program SDK is XHSMini |
$lib_version | String | SDK Version | |
$app_id | String | Mini Program AppID for Xiaohongshu | Need to pass appid when initializing the SDK by calling the init method |
$screen_height | Number | Screen height | |
$screen_width | Number | Screen width | |
$model | String | Device model | |
$manufacturer | String | Device manufacturer | |
$os | String | Operating System | |
$os_version | String | Operating System Version | |
$is_first_day | Boolean | Whether 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_id | Boolean | Whether it is a login ID (determined and added during data storage) | |
$ip | String | Property carried in SDK data request | |
$timezone_offset | Numeric | Timezone offset | Version 0.8 and above |
$country | String | Obtained by IP resolution | |
$province | String | Obtained by IP resolution | |
$city | String | Obtained by IP resolution | |
$network_type | String | Network type | |
$browser | String | Browser name parsed from UA | |
$browser_version | String | Browser version parsed from UA | |
$latest_utm_source | String | Latest paid advertising campaign source | 0.8 and above versions |
$latest_utm_medium | String | Latest paid advertising campaign medium | 0.8 and above versions |
$latest_utm_term | String | Latest paid advertising campaign term | Version 0.8 and above |
$latest_utm_content | String | Latest paid advertising campaign content | Version 0.8 and above |
$latest_utm_campaign | String | Latest paid advertising campaign name | Version 0.8 and above |
$latest_scene | String | Latest launch scene value | 0.8 and above |
Note: The content of this document is a technical document that provides details on how to use the Sensors product and does not include sales terms; the specific content of enterprise procurement products and technical services shall be subject to the commercial procurement contract.