漏斗图适用于单流向单路径的业务流程,对各环节进行统计并用梯形面积表示某个环节业务量与上一个环节之间的差异。
图表配置
通用配置
配置项 | 说明 |
基础信息 | 图表名称:设置图表的显示名称,可为空。 |
图例 | 设置图表的图例内容,可以控制图例的样式与位置。同时也支持配置需要作为图例显示的数据。 |
标准配置 |
漏斗图配置
配置项 | 说明 |
漏斗图 | 排序方式:漏斗图数值的排序。默认按照查询结果依次排列。 显示值:设置漏斗图每一层的标签显示形式,可以选择值或转化率。 标签:配置漏斗图标签的显示内容。 标签位置:配置标签在图表里的位置。 显示:漏斗图显示数值的方式 选择所有值则会将每个单元格的数值单独作为一层显示,支持配置显示的数值数量。 选择计算值则会将每列的数值聚合为一层显示,支持配置聚合的统计方式。 指标:显示的指标字段,默认显示所有指标字段。 转化率:设置转化率的计算方式,支持按占第一层的百分比计算或按占上一层的百分比计算。 |
语句示例
统计用户访问路径各节点的转化率:
* | select url, count(*) as pv group by url limit 5
统计用户转化率:
event:(Advertising OR EnterTheMall OR BrowserTheList OR Order OR Payment) |select count(distinct ip) as "用户数", CASEWHEN event = 'Advertising' THEN '进入活动页面'WHEN event = 'EnterTheMall' THEN '打开商城'WHEN event = 'BrowserTheList' THEN '查看商品介绍'WHEN event = 'Order' THEN '确认下单'WHEN event = 'Payment' THEN '确认付款'ELSE 'other' END as event group by event limit 1000
统计注册用户的七日留存率:
* | selectcount(distinct (CASE WHEN count < 1 THEN ip END)) as "第1天留存率",count(distinct (CASE WHEN count = 1 THEN ip END)) as "第2天留存率",count(distinct (CASE WHEN count = 2 THEN ip END)) as "第3天留存率",count(distinct (CASE WHEN count = 3 THEN ip END)) as "第4天留存率",count(distinct (CASE WHEN count = 4 THEN ip END)) as "第5天留存率",count(distinct (CASE WHEN count = 5 THEN ip END)) as "第6天留存率",count(distinct (CASE WHEN count = 6 THEN ip END)) as "第7天留存率"from(select t1-t0 as count,table1.ip from( select extract( day_of_year from cast(__TIMESTAMP__ as timestamp)) as t0 ,ip where event='SighUp' group by t0 ,ip limit 10000 )as table1left join( select extract( day_of_year from cast(__TIMESTAMP__ as timestamp)) as t1 ,ip where event='EnterTheMall' group by t1 ,ip limit 10000 )as table2on table1.ip = table2.ip)