活跃留存用户

功能介绍

获取本APP的活跃留存用户报告相关数据

接口

  1. https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey

请求参数

此处仅列本接口特有参数,公共参数请参考报告级API说明

获取表格数据

参数名参数类型是否必须描述
methodstringretaineduser/a
flagstringactive
metricsstring指标列表,指标间逗号分隔
granstringday/week/month,默认为day

flag必须填写,并且值必须为active

指标

指标名描述适用接口
active_user_count活跃用户数,必须retaineduser/a
retained_user_count留存用户数,与留存率二选一retaineduser/a
retained_ratio留存率,与留存用户数二选一retaineduser/a

如果retained_user_countretained_ratio都没有提供,默认按retained_ratio处理

示例

获取活跃留存用户数报表

请求

  1. 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

响应

  1. {
  2. "status": 0,
  3. "msg": "",
  4. "data": {
  5. "offset": 0,
  6. "timeSpan": [
  7. "2017/11/02 - 2017/11/08"
  8. ],
  9. "fields": [
  10. "active_use_day",
  11. "active_user_count",
  12. "第2天",
  13. "第3天",
  14. "第4天",
  15. "第5天",
  16. "第6天",
  17. "第7天",
  18. "第8天",
  19. "第9天"
  20. ],
  21. "total": 7,
  22. "end": 0,
  23. "sum": [
  24. [
  25. "--"
  26. ],
  27. []
  28. ],
  29. "pageSum": [],
  30. "items": [
  31. [
  32. [
  33. "2017/11/02"
  34. ],
  35. [
  36. "2017/11/03"
  37. ],
  38. [
  39. "2017/11/04"
  40. ],
  41. [
  42. "2017/11/05"
  43. ],
  44. [
  45. "2017/11/06"
  46. ],
  47. [
  48. "2017/11/07"
  49. ],
  50. [
  51. "2017/11/08"
  52. ]
  53. ],
  54. [
  55. [
  56. 72014867,
  57. 64.76,
  58. 62.85,
  59. 62.48,
  60. 62.2,
  61. 62.26,
  62. 0,
  63. "",
  64. ""
  65. ],
  66. [
  67. 72409445,
  68. 65.1,
  69. 63.36,
  70. 61.25,
  71. 61.37,
  72. 0,
  73. "",
  74. "",
  75. ""
  76. ],
  77. [
  78. 75034813,
  79. 64.87,
  80. 59.82,
  81. 59.61,
  82. 0,
  83. "",
  84. "",
  85. "",
  86. ""
  87. ],
  88. [
  89. 75675141,
  90. 61.86,
  91. 60.63,
  92. 0,
  93. "",
  94. "",
  95. "",
  96. "",
  97. ""
  98. ],
  99. [
  100. 71689616,
  101. 66.19,
  102. 0,
  103. "",
  104. "",
  105. "",
  106. "",
  107. "",
  108. ""
  109. ],
  110. [
  111. 72700344,
  112. 0,
  113. "",
  114. "",
  115. "",
  116. "",
  117. "",
  118. "",
  119. ""
  120. ],
  121. [
  122. 44304803,
  123. "",
  124. "",
  125. "",
  126. "",
  127. "",
  128. "",
  129. "",
  130. ""
  131. ]
  132. ],
  133. [],
  134. []
  135. ]
  136. }
  137. }