首页 > 用户手册 > 导出报表数据——漏斗分析

导出报表数据——漏斗分析

1.漏斗各步骤数据

POST _SJK_API_PATH_/api-v2/funnel/calculate

请求参数:

字段 格式 说明 是否必需 示例
access_token string 通过oauth认证获取的token
platform_id int 平台id web:1 H5:2 IOS:3 Android:4 微信小程序:5
funnel_id int 自定义漏斗id 通过base/funnels接口获取
predicates array 筛选条件 predicates[0][values][]=搜索引擎&predicates[0][op]=eq&predicates[0][name]=channel_type 即为筛选访问渠道类型等于搜索引擎的数据。其中op操作符可能出现的值:eq / ne / gt / ge / lt / le / like / nlike / between / null / not null
dimension string 维度(即属性),用于分组查询 数据通过 base/attrs接口获取 dimension=channel 即为按访问渠道名称分组
time_range array 查询的时间范围 time_range[]=2019-08-06&time_range[]=2019-08-12需要有起始时间和结束时间2个值且结束时间不能小于起始时间

调用示例:

curl -d 'access_token=_TOKEN_&platform_id=1&funnel_id=618&dimension=channel_type&time_range[]=2019-08-13&time_range[]=2019-08-13' https://a.shujike.com/api-v2/funnel/calculate

Response:

{
  "status": 0,
  "msg": {
    "msg": "success",
    "desc": ""
  },
  "data": [
    [
      [
        null, //null 为总计,不区分维度
        "111,5,1"
      ],
      [
        "外链", //
        "12"
      ],
      [
        "搜索引擎",
        "48,4,1"
      ],
      [
        "直接访问",
        "50,1"
      ],
      [
        "社交媒体",
        "1"
      ]
    ]
  ]

字段含义: [[null,"第一步总人数,第二步总人数,第三步总人数..."],[维度值1,"第一步人数,第二步人数,第三步人数..."],[维度值2,..]...]

2.漏斗各步骤url流入流出数据

POST _SJK_API_PATH_/api-v2/funnel/urls

请求参数:同 funnel/calculate 接口 调用示例:

curl -d 'access_token=_TOKEN_&platform_id=1&funnel_id=618&dimension=channel_type&time_range[]=2019-08-11&time_range[]=2019-08-11' https://a.shujike.com/api-v2/funnel/urls

Response:

{
  "status": 0,
  "msg": {
    "msg": "success",
    "desc": ""
  },
  "data": [
    [
      "e0",
      "\u641c\u7d22\u5f15\u64ce",
      "https:\/\/www.shujike.com\/product\/analytics.html",
      3
    ],
    [
      "e0",
      "\u641c\u7d22\u5f15\u64ce",
      "https:\/\/www.shujike.com\/product\/pricing-ua.html",
      3
    ],
    [
      "s0",
      "\u5916\u94fe",
      "https:\/\/opendatainception.io\/",
      2
    ],
    [
      "s0",
      "\u641c\u7d22\u5f15\u64ce",
      "https:\/\/www.baidu.com\/link",
      16
    ],
    [
      "s1",
      "\u76f4\u63a5\u8bbf\u95ee",
      "\u76f4\u63a5\u8bbf\u95ee",
      4
    ],
    [
      "s2",
      "\u641c\u7d22\u5f15\u64ce",
      "https:\/\/www.baidu.com\/link",
      2
    ],
    [
      "s2",
      "\u76f4\u63a5\u8bbf\u95ee",
      "\u76f4\u63a5\u8bbf\u95ee",
      1
    ]
  ]
}

字段含义: [[出入步骤 维度值,url, 人数],[],..]

e为离开页面,s为入口页面,后面数字为漏斗step 从0开始计数 如e0,为第一步的离开页面, s1为第二步的入口页面

3.漏斗明细

POST _SJK_API_PATH_/api-v2/funnel/detail

请求参数:

字段 格式 说明 是否必需 示例
access_token string 通过oauth认证获取的token
platform_id int 平台id web:1 H5:2 IOS:3 Android:4 微信小程序:5
funnel_id int 自定义漏斗id 通过base/funnels接口获取
predicates array 筛选条件 predicates[0][values][]=搜索引擎&predicates[0][op]=eq&predicates[0][name]=channel_type 即为筛选访问渠道类型等于搜索引擎的数据。其中op操作符可能出现的值:eq / ne / gt / ge / lt / le / like / nlike / between / null / not null
dimension string 维度(即属性),用于分组查询 数据通过 base/attrs接口获取 dimension=channel 即为按访问渠道名称分组
time_range array 查询的时间范围 time_range[]=2019-08-06&time_range[]=2019-08-12需要有起始时间和结束时间2个值且结束时间不能小于起始时间
step int 漏斗步数 从0开始
predicates2 array 具体查询明细的时间和维度条件 predicates2[0][name]=channel&predicates2[0][op]=eq&predicates2[0][values][]=BING&predicates2[1][name]=dd&predicates2[1][op]=eq&predicates2[1][values][]=2019-08-12 必须由时间维度和所选的dimensions的具体值组成限定条件

调用示例:

curl -d 'access_token=_TOKEN_&platform_id=1&funnel_id=618&dimension=register_channel_type&predicates2[0][name]=register_channel_type&predicates2[0][op]=eq&predicates2[0][values][]=其他渠道&time_range[]=2019-08-13&time_range[]=2019-08-13&step=1' https://a.shujike.com/api-v2/funnel/detail

Response:

{
  "status": 0,
  "msg": {
    "msg": "success",
    "desc": ""
  },
  "data": [
    [
      "c9a6d9d71046af1f",
      "-",
      "2019-08-13 17:53:17",
      "\u65b0\u8bbf\u5ba2",
      "\u672a\u6ce8\u518c\u7528\u6237",
      "\u641c\u7d22\u5f15\u64ce",
      "\u767e\u5ea6\u641c\u7d22",
      "\u6cb3\u5317",
      "\u77f3\u5bb6\u5e84"
    ],
    [
      "eced5854a918d5df",
      "-",
      "2019-08-13 23:12:54",
      "\u65b0\u8bbf\u5ba2",
      "\u672a\u6ce8\u518c\u7528\u6237",
      "\u641c\u7d22\u5f15\u64ce",
      "\u767e\u5ea6\u641c\u7d22",
      "\u5c71\u4e1c",
      "-"
    ],
    [
      "d84e47db583d30ab",
      "-",
      "2019-08-13 16:06:39",
      "\u56de\u8bbf\u8bbf\u5ba2",
      "\u672a\u6ce8\u518c\u7528\u6237",
      "\u76f4\u63a5\u8bbf\u95ee",
      "\u76f4\u63a5\u8bbf\u95ee",
      "\u6c5f\u82cf",
      "\u82cf\u5dde"
    ],
    [
      "04977f9c5cf996e7",
      "109937",
      "2019-08-13 21:56:02",
      "\u65b0\u8bbf\u5ba2",
      "\u6ce8\u518c\u7528\u6237",
      "\u641c\u7d22\u5f15\u64ce",
      "\u641c\u72d7",
      "\u8fbd\u5b81",
      "\u5927\u8fde"
    ],
    [
      "b4dc7d57d7b251d4",
      "109763",
      "2019-08-13 09:41:24",
      "\u56de\u8bbf\u8bbf\u5ba2",
      "\u6ce8\u518c\u7528\u6237",
      "\u641c\u7d22\u5f15\u64ce",
      "\u767e\u5ea6\u641c\u7d22",
      "\u5317\u4eac",
      "\u5317\u4eac"
    ]
  ]
}

字段含义 [[数极客ID,用户ID,最近访问时间,访客类型,注册类型,渠道类型,渠道名称,所在省份,所在城市]..]

results matching ""

    No results matching ""