活跃用户留存
优质
小牛编辑
126浏览
2023-12-01
功能介绍
获取本APP的活跃留存用户报告相关数据
接口
https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey
请求参数
此处仅列本接口特有参数,公共参数请参考报告级API说明
获取表格数据
参数名 | 参数类型 | 是否必须 | 描述 |
---|---|---|---|
method | string | 是 | retaineduser/a |
flag | string | 是 | active |
metrics | string | 是 | 指标列表,指标间逗号分隔 |
gran | string | 否 | day/week/month,默认为day |
flag必须填写,并且值必须为
active
指标
指标名 | 描述 | 适用接口 |
---|---|---|
active_user_count | 活跃用户数,必须 | retaineduser/a |
retained_user_count | 留存用户数,与留存率二选一 | retaineduser/a |
retained_ratio | 留存率,与留存用户数二选一 | retaineduser/a |
如果
retained_user_count
与retained_ratio
都没有提供,默认按retained_ratio
处理
示例
获取活跃留存用户数报表
请求
https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey?access_token=[ACCESS_TOKEN]&key=[APP_KEY]&method=retaineduser/a&flag=active&gran=day&start-date=20170101000000&end-date=20170101232359&metrics=active_user_count,retained_user_count
响应
{
"status": 0,
"msg": "",
"data": {
"offset": 0,
"timeSpan": [
"2017/11/02 - 2017/11/08"
],
"fields": [
"active_use_day",
"active_user_count",
"第2天",
"第3天",
"第4天",
"第5天",
"第6天",
"第7天",
"第8天",
"第9天"
],
"total": 7,
"end": 0,
"sum": [
[
"--"
],
[]
],
"pageSum": [],
"items": [
[
[
"2017/11/02"
],
[
"2017/11/03"
],
[
"2017/11/04"
],
[
"2017/11/05"
],
[
"2017/11/06"
],
[
"2017/11/07"
],
[
"2017/11/08"
]
],
[
[
72014867,
64.76,
62.85,
62.48,
62.2,
62.26,
0,
"",
""
],
[
72409445,
65.1,
63.36,
61.25,
61.37,
0,
"",
"",
""
],
[
75034813,
64.87,
59.82,
59.61,
0,
"",
"",
"",
""
],
[
75675141,
61.86,
60.63,
0,
"",
"",
"",
"",
""
],
[
71689616,
66.19,
0,
"",
"",
"",
"",
"",
""
],
[
72700344,
0,
"",
"",
"",
"",
"",
"",
""
],
[
44304803,
"",
"",
"",
"",
"",
"",
"",
""
]
],
[],
[]
]
}
}