ByteDance Mini Program SDK Predefined Events and Properties
|
Collect
1. Predefined Events
Event Variable Name | Event Display Name | Property Variable Name | Property Display Name | Property Data Type | Property Value Example or Description | Trigger Timing | Description | Corresponding Lifecycle |
---|---|---|---|---|---|---|---|---|
$MPLaunch | Mini Program Launch | $Predefined Properties | This will be triggered when the Mini Program is killed, reopened, and sa.quick('appLaunch', options) is called in the corresponding Mini Program lifecycle function. | This will be triggered once when the Mini Program is initialized. | App.onLaunch | |||
$scene | Launch scene | String | ||||||
$url_path | Page path | String | ||||||
$is_first_time | Whether first time | Boolean | ||||||
$utm_source | Advertisement campaign source | String | Version 0.3 and above | |||||
$utm_medium | Advertisement campaign medium | String | Version 0.3 and above | |||||
$utm_term | Ad Campaign Keyword | String | Version 0.3 and above | |||||
$utm_content | Ad Campaign Content | String | Version 0.3 and above | |||||
$utm_campaign | Ad Campaign Name | String | Version 0.3 and above | |||||
$MPShow | Mini Program Display | $predefined_property | When the Mini Program is launched, or when it is brought to the foreground from the background and sa.quick('appShow', options) is called in the corresponding Mini Program lifecycle function | launch Mini Program | App.onShow | |||
$scene | launch scene | string | ||||||
$url_path | page path | string | ||||||
$utm_source | campaign source | String | 0.3 or above version | |||||
$utm_medium | campaign medium | String | 0.3 or above version | |||||
$utm_term | Advertising Campaign Keywords | String | Version 0.3 and above | |||||
$utm_content | Advertising Campaign Content | String | Version 0.3 and above | |||||
$utm_campaign | Advertising Campaign Name | String | Version 0.3 and above | |||||
$MPHide | Miniprogram Minimizes | $preset_property | Triggers when clicking the exit button on the upper right corner of the mini program, related App goes to the background, entering the about page of the mini program, phone screen locks, or the mini program process is killed and sa.quick('Hide') is called in the corresponding mini program lifecycle function. | Miniprogram goes from foreground to background | App.onHide | |||
$event_duration | Duration | Metric | The time from $MPShow to $MPHide when the Mini Program goes to the background or closes | |||||
$url_path | Page Path | String |
2. Common attributes for all events
Field Name | Type | Description | Remarks |
---|---|---|---|
$lib | String | SDK Type | The value of the ByteDance Mini Program SDK is BytedanceMini |
$lib_version | String | SDK Version | |
$app_id | String | ByteDance Mini Program AppID | Need to pass appid when initializing SDK with setPara 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 (From the first visit of a new user until midnight between the first day and the next day, it is true. Afterwards, it is false, indicating existence in storage) | |
$is_login_id | Boolean | Whether it is a login ID (Judged and added when data is stored) | |
$ip | String | Attribute carried when SDK sends data requests | |
$timezone_offset | Numerical | Timezone Offset | Version 0.6.0 and above |
$country | String | Derived from IP | |
$province | String | Derived from IP | |
$city | String | Derived from IP | |
$network_type | String | Network Type | |
$browser | String | Browser name parsed from User-Agent | |
$browser_version | String | Browser version parsed from User-Agent | |
$latest_utm_source | String | Latest paid advertising campaign source | 0.3 and above versions |
$latest_utm_medium | String | Latest paid advertising campaign medium | 0.3 and above versions |
$latest_utm_term | String | Latest paid advertising campaign term | 0.3 and above |
$latest_utm_content | String | Last paid advertising campaign content | 0.3 and above |
$latest_utm_campaign | String | Last paid advertising campaign name | 0.3 and above |
$latest_scene | String | Last launched scene value | 0.3 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.