码迷,mamicode.com
首页 > 数据库 > 详细

Push拉起率评估【含SQL源码】

时间:2020-09-10 22:48:41      阅读:56      评论:0      收藏:0      [点我收藏+]

标签:学习   成功   inf   开发者   sel   定向   最优   to_date   rom   

关注免费获取资料
1、可免费领取数据相关的面试题+面试攻略。
2、可免费领取<中台>相关的资料;
3、进交流群,认识更多的数据小伙伴。

消息推送是产品开发者与用户最直接的一种对话形式,是APP运营最优质的传播方式,同时也是一把双刃剑,运营不得当,就会对产品带来极大的影响。

一、 为什么要做好Push拉起率评估?

1
定向Push商业化推送

常见于电商等消费类APP,比如APP举办一个优惠促销活动,主要目的是用户购买。通过消息推送告知用户活动信息,能大幅提升购买率及复购率。另外,还有一些APP的商业广告,通过消息推送,也能够提升商业收益。
2
延长用户生命周期,提升产品DAU

    1. 移动互联网发展迅速,每台手机平均安装34个APP,月平均新装3.5个APP,同时,每月卸载APP达到了3.4个。单个APP的寿命越来越短;

一份报告表示,通过消息推送,留存率能够提升2.5倍。如果用户打开了一款应用的消息推送功能,那么 62% 的用户会在几个月之后再次使用这款应用。
3
提升用户消费频次

正常情况下,用户使用单个APP频率有限,更多的用户都是没有打开APP的,为了提升APP内广告和内容消费增长(通常端内会有推广资源位),所以消息推送是很重要的一环;

小结(分两个层面叙述)
1.用户每天首次启动是由Push冷启动拉起的比例;(衡量Push带来的DAU增长)
2.用户每天至少有一次被Push冷启动拉起的比例;(衡量Push带来的DAU增长和Push带来的消费频次增长)

二、如何分析Push拉起效果?

常见名词解释:(对于APP启动而言)
冷启动:后台无该APP任何进程,如果此时用户通过主动行为唤醒APP即为冷启动;
热启动:后台存在该APP进程,如果此时用户通过主动行为(包括HOME键点击返回等等方式)进入APP即为热启动;

Push用户行为路径详解:
技术图片

场景说明:(只以冷启动侧为例)
场景①:用户在看到Push消息后,10s内直接冷启动APP;(例:Push起到提醒作用,使用户直接打开APP)
场景②:用户点击Push消息后冷启动APP成功;(例:Push通知可能真正吸引到用户点击)
场景③:用户点击Push消息后冷启动APP失败,10s内直接冷启动APP;(例:Push拉起失败后,用户可能手动直接打开APP)

三、SQL源码详解(包含②和③)

/*4.0 push漏斗数据计算*/
SELECT time,
show_count/arrive_count AS show_rate,
click_count/show_count AS click_rate,
push_from_background_count/click_count AS push_from_background_rate,
push_from_appstart_count/click_count AS push_from_appstart_rate,
ai_push_from_background_count/push_from_background_count AS ai_push_from_background_rate,
ai_push_from_appstart_count/push_from_appstart_count AS ai_push_from_appstart_rate,
artificial_push_from_background_count/push_from_background_count AS artificial_push_from_background_rate,
artificial_push_from_appstart_count/push_from_appstart_count AS artificial_push_from_appstart_rate,
not_ai_art_push_from_background_count/push_from_background_count AS not_ai_art_push_from_background_rate,
not_ai_art_push_from_appstart_count/push_from_appstart_count AS not_ai_art_push_from_appstart_rate,
send_count,arrive_count,show_count,click_count,push_from_background_count,
push_from_appstart_count,ai_push_from_background_count,ai_push_from_appstart_count,
artificial_push_from_background_count,artificial_push_from_appstart_count,not_ai_art_push_from_background_count,
not_ai_art_push_from_appstart_count
FROM(
/*3.0 合并push全流程*/
SELECT e.time,e.send_count,e.arrive_count,e.show_count,e.click_count,f.push_from_background_count,
f.push_from_appstart_count,f.ai_push_from_background_count,f.ai_push_from_appstart_count,
f.artificial_push_from_background_count,f.artificial_push_from_appstart_count,f.not_ai_art_push_from_background_count,
f.not_ai_art_push_from_appstart_count FROM(
/*2.0 按天统计push发送,到达,展示,点击以及各占发送的比例*/
SELECT TO_DATE(time) AS time,
SUM(CASE WHEN action=‘send‘ THEN 1 ELSE 0 END) AS send_count,
SUM(CASE WHEN action=‘arrive‘ THEN 1 ELSE 0 END) AS arrive_count,
SUM(CASE WHEN action=‘show‘ THEN 1 ELSE 0 END) AS show_count,
SUM(CASE WHEN action=‘click‘ THEN 1 ELSE 0 END) AS click_count
FROM events WHERE time>=‘2020-05-03 00:00:00‘ AND time<=‘2020-06-01 23:59:59‘
AND event=‘Push‘
AND region=‘BR‘
AND package_name=‘com.vstatus.premium‘
AND version_code>2050000
AND action IN (‘send‘,‘arrive‘,‘show‘,‘click‘)
GROUP BY time
/*2.0 结尾*/  
)e LEFT JOIN(
/*1.0 区分时间的push开启率*/
SELECT time,
SUM(CASE WHEN $resume_from_background=1 THEN 1 ELSE 0 END)AS push_from_background_count,
SUM(CASE WHEN $resume_from_background=0 THEN 1 ELSE 0 END)AS push_from_appstart_count,
SUM(CASE WHEN position_source=‘reco_push_ai‘AND $resume_from_background=1 THEN 1 ELSE 0 END)AS ai_push_from_background_count, 
SUM(CASE WHEN position_source=‘reco_push_ai‘AND $resume_from_background=0 THEN 1 ELSE 0 END)AS ai_push_from_appstart_count,
SUM(CASE WHEN position_source=‘reco_push‘AND $resume_from_background=1 THEN 1 ELSE 0 END)AS artificial_push_from_background_count,
SUM(CASE WHEN position_source=‘reco_push‘AND $resume_from_background=0 THEN 1 ELSE 0 END)AS artificial_push_from_appstart_count,
SUM(CASE WHEN position_source<>‘reco_push‘ AND position_source<>‘reco_push_ai‘AND $resume_from_background=1 THEN 1 ELSE 0 END)AS not_ai_art_push_from_background_count,
SUM(CASE WHEN position_source<>‘reco_push‘ AND position_source<>‘reco_push_ai‘AND $resume_from_background=0 THEN 1 ELSE 0 END)AS not_ai_art_push_from_appstart_count
FROM(  
SELECT TO_DATE(push_time)AS time,position_source,$resume_from_background FROM(
SELECT push_userid,push_time,position_source,min(appstart_time),$resume_from_background FROM( 
SELECT a.user_id AS push_userid,a.time AS push_time,a.position_source,b.user_id AS appstart_userid,b.time AS appstart_time,b.$resume_from_background FROM 
(/*1.0 筛选出所有的push事件*/
SELECT user_id,time,position_source FROM events 
WHERE time>=‘2020-05-03 00:00:00‘ AND time<=‘2020-06-01 23:59:59‘
AND event=‘Push‘ 
AND action=‘click‘
AND region=‘BR‘
AND package_name=‘com.vstatus.premium‘
AND version_code>2050000
GROUP BY user_id,time,position_source
ORDER BY time
/*1.0 结尾*/
)a RIGHT JOIN
(/*1.0 筛选出所有的$AppStart事件*/
SELECT user_id,time,$resume_from_background FROM events 
WHERE time>=‘2020-05-03 00:00:00‘ AND time<=‘2020-06-01 23:59:59‘
AND event=‘$AppStart‘
AND region=‘BR‘
AND package_name=‘com.vstatus.premium‘
AND version_code>2050000
GROUP BY user_id,time,$resume_from_background
ORDER BY time
/*1.0 结尾*/
)b ON a.user_id=b.user_id AND b.time>a.time AND b.time<SECONDS_ADD(a.time,10)
)c GROUP BY push_userid,push_time,position_source,$resume_from_background
)d WHERE push_time IS NOT NULL
)a GROUP BY time
/*1.0 结尾*/
)f ON e.time=f.time
/*3.0 结尾*/
)g ORDER BY time
/*4.0 结尾*/

四、小结

如果用户本来使用APP的频率并不高,还每天收到消息的话,可能会导致用户直接卸载APP。
所以作为运营,在做推送的同时,也应该关注消息屏蔽率和卸载率。
消息推送这把利器,对运营有利有弊。用的好,对用户的活跃和留存提升非常明显,用的不好,反而影响用户体验,加快用户流失。

技术图片
一个数据人的自留地是一个助力数据人成长的大家庭,帮助对数据感兴趣的伙伴们明确学习方向、精准提升技能。
扫码关注我,带你探索数据的神奇奥秘

Push拉起率评估【含SQL源码】

标签:学习   成功   inf   开发者   sel   定向   最优   to_date   rom   

原文地址:https://blog.51cto.com/14915210/2525590

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!