路径转化

功能介绍

获取路径转化漏斗的漏斗图和转化图数据。

接口

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

请求参数

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

获取表格数据

参数名参数类型是否必须描述
methodstringconversion/pathconversion/a;conversion/pathconversion/f
typestring可选值为: funnel-> 漏斗报告, trend->趋势报告
conversionIdint该转化漏斗的id
metricsstring指标列表,指标间逗号分隔
eventIdint当请求type为trend, method为conversion/pathconversion/f时,加入此参数请求单个级别的转化率趋势
natureint自然日:1,自然周:2,自然月:3

此报告所请求的时间会按照nature的值自动调整到适合的自然日、自然周、自然月

指标

指标名描述适用接口
conversion_user_count转化用户数conversion/pathconversion/a
conversion_session_count事件次数conversion/pathconversion/a
conversion_ratio转化率conversion/pathconversion/a,conversion/pathconversion/f

示例

获取路径转化的漏斗图数据

请求

  1. https://openapi.baidu.com/rest/2.0/mtj/svc/app/getDataByKey?access_token=[ACCESS_TOKEN]&key=[APP_KEY]&method=conversion/pathconversion/f&start-date=20170101000000&end-date=20170101232359&metrics=conversion_ratio&nature=1&conversionId=333&type=funnel

响应

  1. {
  2. "status": 0,
  3. "msg": "",
  4. "data": {
  5. "offset": 0,
  6. "timeSpan": [
  7. "2017\/11\/07"
  8. ],
  9. "fields": [
  10. "conversion_step_title",
  11. "conversion_user_count",
  12. "conversion_ratio"
  13. ],
  14. "total": 3,
  15. "end": 0,
  16. "sum": [
  17. [
  18. 0,
  19. 0
  20. ],
  21. []
  22. ],
  23. "pageSum": [],
  24. "items": [
  25. [
  26. [
  27. {
  28. "id": "379395",
  29. "label": "选车"
  30. }
  31. ],
  32. [
  33. {
  34. "id": "333410",
  35. "label": "车辆详情"
  36. }
  37. ],
  38. [
  39. {
  40. "id": 312752,
  41. "label": "支付押金"
  42. }
  43. ]
  44. ],
  45. [
  46. [
  47. 771,
  48. 100
  49. ],
  50. [
  51. 3,
  52. 0.39
  53. ],
  54. [
  55. 0,
  56. 0
  57. ]
  58. ],
  59. [],
  60. []
  61. ]
  62. }
  63. }