May 19, 2021 WeChat Mini Program Development Document
Get small program access analysis data, data description see Access Analytics
daily trend
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token=ACCESS_TOKEN
POST parameter description
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date |
end_date | Is | End date, limit queries to 1 day of data, end_date allowed to set the maximum value for yesterday |
POST content example:
{
"begin_date" : "20170313",
"end_date" : "20170313"
}
Return the parameter description:
Parameters | Description |
---|---|
ref_date | Date: e.g.: "20170313" |
session_cnt | Number of opens |
visit_pv | Number of visits |
visit_uv | Number of visitors |
visit_uv_new | The number of new users |
stay_time_uv | Length of stay per capita (floating point type, in seconds) |
stay_time_session | Duration of second stay (floating point type, in seconds) |
visit_depth | Average access depth (floating-point type) |
Return an example of the data:
{
"list": [
{
"ref_date": "20170313",
"session_cnt": 142549,
"visit_pv": 472351,
"visit_uv": 55500,
"visit_uv_new": 5464,
"stay_time_session": 0,
"visit_depth": 1.9838
}
]
}
Weekly trends
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappidweeklyvisittrend?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date, which is Monday |
end_date | Is | The end date, which is Sunday, limits the query to one week's data |
Note: Request jason and return jason consistent with the day, here limit query data for a natural week, time must be entered in the nature week way: e.g. 20170306 (Monday), 20170312 (Sunday)
POST content example:
{
"begin_date":"20170306",
"end_date":"20170312"
}
Return the parameter description:
Parameters | Description |
---|---|
ref_date | Time, e.g. "20170306-20170312" |
session_cnt | Number of opens (natural week summary) |
visit_pv | Number of visits (natural week summary) |
visit_uv | Number of visitors (heavy during the natural week) |
visit_uv_new | Number of new users (natural week to go heavy) |
stay_time_uv | Length of stay per capita (floating point type, in seconds) |
stay_time_session | Duration of second stay (floating point type, in seconds) |
visit_depth | Average access depth (floating-point type) |
Return an example of content:
{
"list": [
{
"ref_date": "20170306-20170312",
"session_cnt": 986780,
"visit_pv": 3251840,
"visit_uv": 189405,
"visit_uv_new": 45592,
"stay_time_session": 54.5346,
"visit_depth": 1.9735
}
]
}
Monthly trend
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyvisittrend?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date, which is the first day of the natural month |
end_date | Is | The end date, the last day of the natural month, limits the query to one month of data |
Note: Request jason and return jason consistent with the day, here is limited to querying the data of a natural month, the time must be entered according to the natural month: e.g. 20170201 (early month), 20170228 (month end)
POST content example:
{
"begin_date":"20170201",
"end_date":"20170228"
}
Return the parameter description:
Parameters | Description |
---|---|
ref_date | Time, e.g. "201702" |
session_cnt | Number of opens (summary within natural months) |
visit_pv | Number of visits (summary within natural months) |
visit_uv | Number of visitors (heavy within natural months) |
visit_uv_new | Number of new users (weighted within natural months) |
stay_time_uv | Length of stay per capita (floating point type, in seconds) |
stay_time_session | Duration of second stay (floating point type, in seconds) |
visit_depth | Average access depth (floating-point type) |
Return an example of content:
{
"list": [
{
"ref_date": "201702",
"session_cnt": 126513,
"visit_pv": 426113,
"visit_uv": 48659,
"visit_uv_new": 6726,
"stay_time_session": 56.4112,
"visit_depth": 2.0189
}
]
}
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappidvisitdistribution?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date |
end_date | Is | End date, limit queries to 1 day of data, end_date allowed to set the maximum value for yesterday |
POST content example:
{
"begin_date":"20170313",
"end_date":"20170313"
}
Return the parameter description:
Parameters | Description |
---|---|
ref_date | Date: e.g.: "20170313" |
list | Deposit all types of indicators |
Each item of the list includes:
Parameters | Description |
---|---|
index | The type of distribution |
item_list | A list of distributed data |
The range of values for the distribution type (index):
Value | Description |
---|---|
access_source_session_cnt | Access the source distribution |
access_staytime_info | The length of access distribution |
access_depth_info | Access the distribution of depth |
Each data item includes:
Parameters | Description |
---|---|
key | Scene id |
Value in value scene (both integer type) |
The key correspondence is as follows:
Access source: (index s"access_source_session_cnt")
1: List of program history
2: Search
3: Session
4: QR code
5: Public Home Page
6: Chat top
7: System desktop
8: Small program home page
9: Small program nearby
10: Other
11: Template message
12: Customer service message
13: Public number menu
14: APP shares
15: Payment completion page
16: Press and hold to identify the QR code
17: The album picks a QR code
18: Public Article
Length of visit: (index" access_staytime_info")
1: 0-2s
2: 3-5s
3: 6-10s
4: 11-20s
5: 20-30s
6: 30-50s
7: 50-100s
8: > 100s
Average depth of access: (index" access_depth_info")
1: 1 page
2: 2 pages
3: 3 pages
4: 4 pages
5: 5 pages
6: 6-10 pages
7: 10 pages
Return an example of the data:
{
"ref_date": "20170313",
"list": [
{
"index": "access_source_session_cnt",
"item_list": [
{
"key": 10,
"value": 5
},
{
"key": 8,
"value": 687
},
{
"key": 7,
"value": 10740
},
{
"key": 6,
"value": 1961
},
{
"key": 5,
"value": 677
},
{
"key": 4,
"value": 653
},
{
"key": 3,
"value": 1120
},
{
"key": 2,
"value": 10243
},
{
"key": 1,
"value": 116578
}
]
},
{
"index": "access_staytime_info",
"item_list": [
{
"key": 8,
"value": 16329
},
{
"key": 7,
"value": 19322
},
{
"key": 6,
"value": 21832
},
{
"key": 5,
"value": 19539
},
{
"key": 4,
"value": 29670
},
{
"key": 3,
"value": 19667
},
{
"key": 2,
"value": 11794
},
{
"key": 1,
"value": 4511
}
]
},
{
"index": "access_depth_info",
"item_list": [
{
"key": 5,
"value": 217
},
{
"key": 4,
"value": 3259
},
{
"key": 3,
"value": 32445
},
{
"key": 2,
"value": 63542
},
{
"key": 1,
"value": 43201
}
]
}
]
}
Day retention
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappiddailyretaininfo?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date |
end_date | Is | End date, limit queries to 1 day of data, end_date allowed to set the maximum value for yesterday |
POST content example:
{
"begin_date" : "20170313",
"end_date" : "20170313"
}
Return the parameter description:
Parameters | Description |
---|---|
visit_uv_new | New user retention |
visit_uv | Active users are retained |
visit_uv items visit_uv_new, and each item include:
Parameters | Description |
---|---|
key | Identification, 0 starts, 0 represents the day, 1 means 1 day later, and so on, key values are: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30 |
value | Number of new/active users for key corresponding dates (key-0) or number of retained users (k>0) |
Return an example of the data:
{
"ref_date": "20170313",
"visit_uv_new": [
{
"key": 0,
"value": 5464
}
],
"visit_uv": [
{
"key": 0,
"value": 55500
}
]
}
The week is retained
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappidweeklyretaininfo?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date, which is Monday |
end_date | Is | The end date, which is Sunday, limits the query to one week's data |
Note: Request jason and return jason consistent with the day, here limit query data for a natural week, time must be entered in the nature week way: e.g. 20170306 (Monday), 20170312 (Sunday)
POST content example:
{
"begin_date" : "20170306",
"end_date" : "20170312"
}
Return the parameter description:
Parameters | Description |
---|---|
ref_date | Time, e.g. "20170306-20170312" |
visit_uv_new | New user retention |
visit_uv | Active users are retained |
visit_uv items visit_uv_new, and each item include:
Parameters | Description |
---|---|
key | Identification, 0 starts, 0 represents the week, 1 means 1 week later, and so on, key values are: 0, 1, 2, 3, 4 |
value | Number of new/active users for key corresponding dates (key-0) or number of retained users (k>0) |
Return an example of content:
{
"ref_date": "20170306-20170312",
"visit_uv_new": [
{
"key": 0,
"value": 0
},
{
"key": 1,
"value": 16853
}
],
"visit_uv": [
{
"key": 0,
"value": 0
},
{
"key": 1,
"value": 99310
}
]
}
The month remains
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyretaininfo?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date, which is the first day of the natural month |
end_date | Is | The end date, the last day of the natural month, limits the query to one month of data |
Note: Request jason and return jason consistent with the day, here is limited to querying the data of a natural month, the time must be entered according to the natural month: e.g. 20170201 (early month), 20170228 (month end)
POST content example:
{
"begin_date":"20170201",
"end_date":"20170228"
}
Return the parameter description:
Parameters | Description |
---|---|
ref_date | Time, e.g. "201702" |
visit_uv_new | New user retention |
visit_uv | Active users are retained |
visit_uv items visit_uv_new, and each item include:
Parameters | Description |
---|---|
key | Identification, 0 starts, 0 represents the month, 1 means january, key values are: 0, 1 |
value | Number of new/active users for key corresponding dates (key-0) or number of retained users (k>0) |
Return an example of content:
{
"ref_date": "201702",
"visit_uv_new": [
{
"key": 0,
"value": 346249
}
],
"visit_uv": [
{
"key": 0,
"value": 346249
}
]
}
Visit the page
The interface address
https://api.weixin.qq.com/datacube/getweanalysisappidvisitpage?access_token=ACCESS_TOKEN
POST parameter description:
Parameters | Is it required | Description |
---|---|---|
begin_date | Is | The start date |
end_date | Is | End date, limit queries to 1 day of data, end_date allowed to set the maximum value for yesterday |
POST content example:
{
"begin_date":"20170313",
"end_date":"20170313"
}
Return the parameter description:
Parameters | Description |
---|---|
page_path | The page path |
page_visit_pv | Number of visits |
page_visit_uv | Number of visitors |
page_staytime_pv | The duration of each stay |
entrypage_pv | Number of pages entered |
exitpage_pv | Number of exit pages |
page_share_pv | Number of forwards |
page_share_uv | The number of forwards |
Return an example of content:
{
"ref_date": "20170313",
"list": [
{
"page_path": "pages/main/main.html",
"page_visit_pv": 213429,
"page_visit_uv": 55423,
"page_staytime_pv": 8.139198,
"entrypage_pv": 117922,
"exitpage_pv": 61304,
"page_share_pv": 180,
"page_share_uv": 166
},
{
"page_path": "pages/linedetail/linedetail.html",
"page_visit_pv": 155030,
"page_visit_uv": 42195,
"page_staytime_pv": 35.462395,
"entrypage_pv": 21101,
"exitpage_pv": 47051,
"page_share_pv": 47,
"page_share_uv": 42
},
{
"page_path": "pages/search/search.html",
"page_visit_pv": 65011,
"page_visit_uv": 24716,
"page_staytime_pv": 6.889634,
"entrypage_pv": 1811,
"exitpage_pv": 3198,
"page_share_pv": 0,
"page_share_uv": 0
},
{
"page_path": "pages/stationdetail/stationdetail.html",
"page_visit_pv": 29953,
"page_visit_uv": 9695,
"page_staytime_pv": 7.558508,
"entrypage_pv": 1386,
"exitpage_pv": 2285,
"page_share_pv": 0,
"page_share_uv": 0
},
{
"page_path": "pages/switch-city/switch-city.html",
"page_visit_pv": 8928,
"page_visit_uv": 4017,
"page_staytime_pv": 9.22659,
"entrypage_pv": 748,
"exitpage_pv": 1613,
"page_share_pv": 0,
"page_share_uv": 0
}
]
}
Return the parameter description:
Parameters | Description |
---|---|
page_path | The page path |
page_visit_pv | Number of visits |
page_visit_uv | Number of visitors |
page_staytime_pv | The duration of each stay |
entrypage_pv | Number of pages entered |
exitpage_pv | Number of exit pages |
page_share_pv | Number of forwards |
page_share_uv | The number of forwards |
Note: Only top200 sorted page_visit_pv is currently available