To quickly get started with Quick Tracking, we recommend that you learn the basic concepts of the collection SDK and traffic analysis products. These basic concepts run through the entire process from data collection to data analysis.
Behavior collection
In behavior collection, there are four basic concepts to understand:
System event
System events are the most basic metrics that are sent by the SDK to collect statistics on applications. All system event codes (corresponding to the ID field in the SDK message) start with "$$_".
Event name | APP | Mini Program | Web |
Application startup ($$_app_start) | Supported | Allowed | Not allowed |
Application exit ($$_app_end) | Supported | Allowed | Not allowed |
Share ($$_share) | None. | Provided | Not allowed |
The system event message protocol demo is as follows:
{
"ekv": [
{
"9A62BBB3B0B1CD2BEB3F2E21CABED8C3": [
{
"id": "ss_app_start",// The eventid remains unchanged, which represents the app startup event.
"ts": 1610420984378,// The time when the trigger was triggered.
"ds": 0,
"pn": "UMMobCLick",// The name of the process.
"status": 1,// The event is marked before and during the event.
"start_type": 1,// Startup type (cold 1, hot 0)
"rank": 1,// Event trigger sort number (within the same-session, events are accumulated, the upper limit is 10w, and the reset is exceeded)
"page_name": "cn.cctv.video",// The name of the page when the event is triggered.
"url": "cn.cctv.video",
// The super attribute, which is persisted locally.
"gp": {
"umsp_1": "val1111",
"gp": {
"umsp_1": "val1111",
}
}
]
}
]
}
Page Events
Page events are events used to collect page browsing behavior. The logs of page events contain two elements, page event identification code and page code.
Page event identification code: used to identify the event as a page event, corresponding to the ID field in the SDK message. The value is specified by the system,$$_page_start and $$_page_end,$$_page_start indicates that the page event is triggered when the page enters, and $$_page_end indicates that the page event is triggered when the page leaves.
Page Code: the unique identifier of the page, which corresponds to the page_name field in the SDK message. For example, if you want to tag a product details page, you need a code to specify the page as the product details page, such as Page_Detail. There are no special requirements for page codes. To prevent garbled characters, we recommend that you use lowercase letters or lowercase letters plus an underscore(_) as a page code.
The page event message demo is as follows:
{
"ekv": [
{
"9A62BBB3B0B1CD2BEB3F2E21CABED8C3": [
{
"id": "$s_page_end",// The eventid remains unchanged.
"ts": 1610420984370,// The time when the trigger was triggered.
"ds": 0,
"pn": "UMMobCLick",// The name of the process.
"status": 1,// The event is marked before and during the event.
"duration": 720,// The page access duration
"type": 1,// The page collection mode.
"rank": 1,// Event trigger sequence number (same session, event also added, upper limit 10W, more than reset)
"page_name": "cn.cctv.video",// The name of the page when the event is triggered.
"urt": "cn.cctv.video",
"page_start": 1611213614016,//Android records the page exposure time, i0S does not.
// The super attribute, which is persisted locally.
"sp": {
"umsp_1": "val1111"
},
// The global attribute, which is valid once in a lifecycle.
"gp": {
"umsp_i": "val1111"
},
// Page property pass-through
"transp": {
"page_arg1": "super_man"// Event (page) property 1 (user can set multiple)
},
// Customize page properties.
"cusp": {
"page_arg1": "super_man"// Event (page) property 1 (user can set multiple)
}
}
]
}
]
}
Report custom events
Custom events are events other than page events. They are commonly used to collect user actions such as exposures and clicks. Before event tracking, you must specify a code for the event, which corresponds to the ID field in the SDK message. The event code is not mandatory. To prevent garbled characters, we recommend that you use lowercase English or lowercase English plus underscores as the event code.
The custom event message demo is as follows:
{
"ekv": [
{
"9A62BBB3B0B1CD2BEB3F2E21CABED8C3": [
{
"id": "User-defined",// The eventid remains unchanged.
"ts": 1610420984370,// The time when the trigger was triggered.
"ds": 0,
"pn": "UMMobCLick",// The name of the process.
"status": 1,// The event is marked before and during the event.
"rank": 1,// The sequence number of the event trigger. If the event is in the same session, the sequence number is also added.
"page_name": "cn.cctv.video",// The name of the page when the event is triggered.
// The super attribute, which is persisted locally.
"sp": {
"umsp_1": "val1111"
},
// The global attribute, which is valid once in a lifecycle.
"gp": {
"umsp_1": "val1111"
},
"cusp": {
"page_arg1": "super_man"// Event property 1 (you can specify multiple properties)
},
"url": "cn.cctv.video",
"ref_url": "https://xxx.taobao.com",
"ref_page_name": "cn.cctv.main",
"spm_cnt": "b.c.d",//b=page_name. c and d are passed by the user. b is not passed by the user. bcd separate coding
"spm_url": "x.x.",
"spm_pre": "x.x.x"
}
]
}
]
}
Properties
Regardless of the event types, properties need to be classified for events to identify the occurrence scenarios of events. For example, after the basic data such as the number of times and number of persons on the product details page is tracked, you need to add the product category property to the event on the product details page if you want to further know the number of times for different event categories on the product details page.
The properties of Quick Tracking are classified into the following two types:
Global attributes:
The attributes carried by each event, such as geographic location information. The message protocol demo for global attributes is as follows:
{
"ekv": [
{
"9A62BBB3B0B1CD2BEB3F2E21CABED8C3": [
{
"id": "User-defined",// The eventid remains unchanged.
"ts": 1610420984370,// The time when the trigger was triggered.
"ds": 0,
"pn": "UMMobCLick",// The name of the process.
"status": 1,// The event is marked before and during the event.
"rank": 1,// The sequence number of the event trigger. If the event is in the same session, the sequence number is also added.
"page_name": "cn.cctv.video",// The name of the page when the event is triggered.
// The super attribute, which is persisted locally.
"sp": {
"umsp_1": "val1111"
},
// The global attribute, which is valid once in a lifecycle.
"gp": {
"umsp_1": "val1111"
},
"cusp": {
"page_arg1": "super_man"// Event property 1 (you can specify multiple properties)
},
"url": "cn.cctv.video",
"ref_url": "https://xxx.taobao.com",
"ref_page_name": "cn.cctv.main",
"spm_cnt": "b.c.d",//b=page_name. c and d are passed by the user. b is not passed by the user. bcd separate coding
"spm_url": "x.x.",
"spm_pre": "x.x.x"
}
]
}
]
}
Event properties:
Only the attributes carried by this event, such as the commodity price attribute added to the shopping cart, are included in the following message protocol demo:
{
"ekv": [
{
"9A62BBB3B0B1CD2BEB3F2E21CABED8C3": [
{
"id": "User-defined",// The eventid remains unchanged.
"ts": 1610420984370,// The time when the trigger was triggered.
"ds": 0,
"pn": "UMMobCLick",// The name of the process.
"status": 1,// The event is marked before and during the event.
"rank": 1,// The sequence number of the event trigger. If the event is in the same session, the sequence number is also added.
"page_name": "cn.cctv.video",// The name of the page when the event is triggered.
// The super attribute, which is persisted locally.
"sp": {
"umsp_1": "val1111"
},
// The global attribute, which is valid once in a lifecycle.
"gp": {
"umsp_1": "val1111"
},
"cusp": {
"page_arg1": "super_man"// Event property 1 (you can specify multiple properties)
},
"url": "cn.cctv.video",
"ref_url": "https://xxx.taobao.com",
"ref_page_name": "cn.cctv.main",
"spm_cnt": "b.c.d",//b=page_name. c and d are passed by the user. b is not passed by the user. bcd separate coding
"spm_url": "x.x.",
"spm_pre": "x.x.x"
}
]
}
]
}
User identifier
All our behavior analysis must focus on a subject, which is used to connect behaviors. Quick Tracking supports two types of analysis subjects:
Device: the unique identifier of the device, which corresponds to the umid field in the SDK packet. The device is generated by the collection SDK based on the hardware device identifier and is used to identify a unique device.
User: the unique identifier of the user, which is directly connected to the account system of the product. When the user logs in and calls the SDK, the account is used to identify the unique user.