#流量分析首页接口
接口描述
1、流量总览分析
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
type |
String |
false |
pc/wap/app/all |
客户端类类型(默认all) |
date |
date |
false |
2016-12-26 |
时间类型(默认当天) |
请求方法
post htttp://localhost:8080/flowsurvey/overview
请求内容json
{
"date": "2016-12-16",
"type": "pc/wap/app/all"
}
响应内容json
{
"code": 200,
"msg": "",
"data": {
"type": "all",
"date": "2016-12-16",
"content": {
"pv": "",
"uv": "",
"loss_rate": "",
"avg_pv": "",
"avg_stay": ""
}
}
}
2、流量趋势分析(现在默认近7天的数据)
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
type |
String |
false |
pc/wap/app/all |
客户端类类型(默认全部) |
index |
Array |
false |
["pv","uv","loss_rate","avg_pv","avg_stay"] |
指标类型(默认[“pv”,”uv”]) |
请求方法
post http://localhost:8080//flowsurvey/trend
请求内容json
{
"type": "pc/wap/app/all",
"index": [
"pv",
"uv",
"loss_rate",
"avg_pv",
"avg_stay"
]
}
响应内容json
{
"code": 200,
"msg": "",
"data": {
"type": "pc",
"content": [
{
"date": "2016-12-26",
"pv": "",
"uv": "",
"loss_rate": "",
"avg_pv": "",
"avg_stay": ""
},
{
"date": "2016-12-25",
"pv": "",
"uv": "",
"loss_rate": "",
"avg_pv": "",
"avg_stay": ""
},
{
"date": "2016-12-24",
"pv": "",
"uv": "",
"loss_rate": "",
"avg_pv": "",
"avg_stay": ""
}
]
}
}
3、来源排行分析
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
type |
String |
true |
pc/wireless |
客户端类类型 |
date |
date |
false |
2016-12-26 |
时间类型(默认当天) |
请求方法
post htttp://localhost:8080/flowsurvey/resource_rank
请求内容json
{
"date": "2016-12-26",
"type": "pc/wireless"
}
响应内容json(结果已排序 index 从大到小排列)
{
"code": 200,
"msg": "",
"data": {
"type": "pc",
"date": "2016-12-26",
"content": [
{
"index": 1,
"name": "自然流量",
"uv": 1,
"order_rate": "12%",
"order_rate_change": "+- 6%"
},
{
"index": 2,
"name": "搜索流量",
"uv": 1,
"order_rate": "12%",
"order_rate_change": "+- 6%"
}
]
}
}
4、访客行为分析
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
type |
String |
true |
brand/product |
排行分类 |
date |
date |
false |
2016-12-26 |
时间类型(默认当天) |
top |
Int |
false |
|
排名多少(默认前50) |
请求方法
post htttp://localhost:8080/flowsurvey/action_rank
请求内容json
{
"date": "2016-12-16",
"type": “brand/product”,
"top": 50
}
响应内容json (同上 index 排序)
{
"code": 200,
"msg": "",
"data": {
"type": "brand",
"date": "2016-12-26",
"content": [
{
"index": "1",
"name": "vans",
"uv": 7000,
"order_rate": "12%"
},
{
"index": 2,
"name": "adidas",
"uv": 6000,
"order_rate": "8%"
}
]
}
}
5、用户特征分析
请求参数
Param Name |
Param Type |
Required |
Param Value |
Desc |
type |
String |
true |
terminal/city/gender/comp |
特征类型 |
date |
date |
false |
2016-12-26 |
时间类型(默认当天) |
请求方法
post htttp://localhost:8080/flowsurvey/user_rank
请求内容json
{
"date": "2016-12-16",
"type": “terminal/city/gender/comp"
}
#### 响应内容json
##### terminal
{
"code": 200,
"msg": "",
"data": {
"type": "terminal",
"date": "2016-12-26",
"content": [
{
"pc": [
{
"time": 0,
"pv": 1,
"uv": 1
},
{
"time": 1,
"pv": 1,
"uv": 1
}
],
"wireless": [
{
"time": 0,
"pv": 1,
"uv": 1
},
{
"time": 1,
"pv": 1,
"uv": 1
}
]
}
]
}
}
##### city
{
"code": 200,
"msg": "",
"data": {
"type": "city",
"date": "2016-12-26",
"content": [
{
"index": 1,
"name": "上海",
"uv": 1,
"order_rate": "5%"
},
{
"index": 2,
"name": "北京",
"uv": 1,
"order_rate": "5%"
}
]
}
}
##### gender
{
"code": 200,
"msg": "",
"data": {
"type": "gender",
"date": "2016-12-26",
"content": [
{
"index": 1,
"name": "男生",
"uv": 1,
"order_rate": "5%"
},
{
"index": 2,
"name": "女生",
"uv": 1,
"order_rate": "5%"
},
{
"index": 3,
"name": "其它",
"uv": 1,
"order_rate": "5%"
}
]
}
}
##### comp 组成
{
"code": 200,
"msg": "",
"data": {
"type": "comp",
"date": "2016-12-26",
"content": [
{
"index": 1,
"name": "新客",
"uv": 1,
"rate": "5%"
},
{
"index": 2,
"name": "老客",
"uv": 1,
"order_rate": "95%"
}
]
}
}