|
|
@@ -18,37 +18,51 @@ public class UMConfigUtils {
|
|
|
|
|
|
public static final String LOGIN_TYPE = "sheep_login_type";
|
|
|
public static final String LOGIN_OPENID = "sheep_login_openid";
|
|
|
+ //统计点击次数需要的子subtype
|
|
|
+ public enum Event{
|
|
|
+ GAME_DOWNLOAD ("GameDownload"),//游戏下载次数
|
|
|
+ BANNER_CLICK_HORIZONTAL ("BannerClickHorizontal"),//广告点击次数
|
|
|
+ TAB_GAME ("tab_game"),//游戏页签
|
|
|
+ TAB_CATEGORY ("tab_category"), //分类页签
|
|
|
+ TAB_SHEEP ("tab_sheep"),//小绵羊页签
|
|
|
+ TAB_JIEZHEWAN ("tab_jiezhewan"),//借着玩页签
|
|
|
+ TAB_CREDITCARD ("tab_creditcard"),//信用卡页签
|
|
|
+ SHEEP_TASK_TRY ("sheep_task_try"),//试玩赚钱
|
|
|
+ SHEEP_TASK_INVITE ("sheep_task_invite"),//邀请赚钱
|
|
|
+ SHEEP_TASK_LIE ("sheep_task_lie"),//躺着赚钱
|
|
|
+ SHEEP_TIXIAN ("sheep_tixian"),//提现
|
|
|
+ TASK_DETAIL ("task_detail"),//任务详情
|
|
|
+ TASK_DOWNLOAD ("task_download"),//任务详情中->下载游戏
|
|
|
+ TASK_UPLOAD_PICTURE ("task_upload_picture"),//任务详情中->上传截图
|
|
|
+ USER_ACCOUNT_SAFE ("user_account_safe"),//个人中心 -> 账号安全
|
|
|
+ USER_TASK_RECORD ("user_task_record"),//个人中心 -> 任务记录
|
|
|
+ USER_TIXIAN_DETAIL ("user_tixian_detail"),//个人中心 -> 提现明细
|
|
|
+ USER_BIND_PHONE ("user_bind_phone"),//账号安全 -> 绑定手机号(确定按钮)
|
|
|
+ USER_BIND_WEIXIN ("user_bind_weixin"),//账号安全 -> 绑定微信号(立即绑定按钮)
|
|
|
+ USER_AUTHENTICATION ("user_authentication"),//账号安全 -> 实名认证(提交按钮)
|
|
|
+ USER_LOGOUT ("user_logout"),//账号安全 -> 退出登录按钮
|
|
|
+ GAME_SEARCH ("game_search"),//搜索界面-> 搜索按钮
|
|
|
+ GAME_DOWNLOAD_MANAGER ("game_download_manager"),//主界面右上角 -> 下载管理按钮
|
|
|
+ TASK_ACCEPT ("task_accept"),//接取任务
|
|
|
+ SHEEP_NEWBIE_TASK_LIST ("sheep_newbie_task_list"),//新手任务列表界面
|
|
|
+ SHEEP_NEWBIE_TASK_UNDERSTAND_SHEEP ("sheep_newbie_task_understand_sheep"),//一分钟了解小绵羊界面
|
|
|
+ SHEEP_NEWBIE_TASK_REGIST_SUCCESS_DIALOG ("sheep_newbie_task_regist_success_dialog"),//注册小绵羊成功对话框
|
|
|
+ SHEEP_NEWBIE_TASK_LIST_DIALOG ("sheep_newbie_task_list_dialog");//新手任务列表对话框
|
|
|
+ private String key;
|
|
|
+ Event(String key){
|
|
|
+ this.key = key;
|
|
|
+ }
|
|
|
|
|
|
- public static class Event{
|
|
|
- //下载点击事件
|
|
|
- public static final String GAME_DOWNLOAD = "GameDownload";
|
|
|
- //广告点击事件
|
|
|
- public static final String BANNER_CLICK_HORIZONTAL = "BannerClickHorizontal";
|
|
|
- //
|
|
|
- public static final String TAB_GAME = "tab_game";
|
|
|
- public static final String TAB_CATEGORY = "tab_category";
|
|
|
- public static final String TAB_SHEEP = "tab_sheep";
|
|
|
- public static final String TAB_JIEZHEWAN = "tab_jiezhewan";
|
|
|
- public static final String TAB_CREDITCARD = "tab_creditcard";
|
|
|
- public static final String SHEEP_TASK_TRY = "sheep_task_try";
|
|
|
- public static final String SHEEP_TASK_INVITE = "sheep_task_invite";
|
|
|
- public static final String SHEEP_TASK_LIE = "sheep_task_lie";
|
|
|
- public static final String SHEEP_TIXIAN = "sheep_tixian";
|
|
|
- public static final String TASK_DETAIL = "task_detail";
|
|
|
- public static final String TASK_DOWNLOAD = "task_download";
|
|
|
- public static final String TASK_UPLOAD_PICTURE = "task_upload_picture";
|
|
|
- public static final String USER_ACCOUNT_SAFE = "user_account_safe";
|
|
|
- public static final String USER_TASK_RECORD = "user_task_record";
|
|
|
- public static final String USER_TIXIAN_DETAIL = "user_tixian_detail";
|
|
|
- public static final String USER_BIND_PHONE = "user_bind_phone";
|
|
|
- public static final String USER_BIND_WEIXIN = "user_bind_weixin";
|
|
|
- public static final String USER_AUTHENTICATION = "user_authentication";
|
|
|
- public static final String USER_LOGOUT = "user_logout";
|
|
|
- public static final String GAME_SEARCH = "game_search";
|
|
|
- public static final String GAME_DOWNLOAD_MANAGER = "game_download_manager";
|
|
|
- public static final String TASK_ACCEPT = "task_accept";
|
|
|
-
|
|
|
+ public String getKey() {
|
|
|
+ return key;
|
|
|
+ }
|
|
|
|
|
|
+ public void setKey(String key) {
|
|
|
+ this.key = key;
|
|
|
+ }
|
|
|
+ public int getId(){
|
|
|
+ return ordinal()+5001;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static class Source{
|
|
|
@@ -86,63 +100,10 @@ public class UMConfigUtils {
|
|
|
* Umeng事件统计
|
|
|
* @param event
|
|
|
*/
|
|
|
- public static void onEvent(String event){
|
|
|
- MobclickAgent.onEvent(SheepApp.mContext,event);
|
|
|
- //本服数据统计
|
|
|
- int subType = 0;
|
|
|
- if(event.equals(Event.GAME_DOWNLOAD)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.game_download;
|
|
|
- }else if(event.equals(Event.BANNER_CLICK_HORIZONTAL)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.banner_click_horizontal;
|
|
|
- }else if(event.equals(Event.TAB_GAME)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.tab_game;
|
|
|
- }else if(event.equals(Event.TAB_CATEGORY)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.tab_category;
|
|
|
- }else if(event.equals(Event.TAB_SHEEP)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.tab_sheep;
|
|
|
- }else if(event.equals(Event.TAB_JIEZHEWAN)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.tab_jiezhewan;
|
|
|
- }else if(event.equals(Event.TAB_CREDITCARD)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.tab_creditcard;
|
|
|
- }else if(event.equals(Event.SHEEP_TASK_TRY)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.sheep_task_try;
|
|
|
- }else if(event.equals(Event.SHEEP_TASK_INVITE)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.sheep_task_invite;
|
|
|
- }else if(event.equals(Event.SHEEP_TASK_LIE)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.sheep_task_lie;
|
|
|
- }else if(event.equals(Event.SHEEP_TIXIAN)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.sheep_tixian;
|
|
|
- }else if(event.equals(Event.TASK_DETAIL)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.task_detail;
|
|
|
- }else if(event.equals(Event.TASK_DOWNLOAD)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.task_download;
|
|
|
- }else if(event.equals(Event.TASK_UPLOAD_PICTURE)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.task_upload_picture;
|
|
|
- }else if(event.equals(Event.USER_ACCOUNT_SAFE)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_account_safe;
|
|
|
- }else if(event.equals(Event.USER_TASK_RECORD)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_task_record;
|
|
|
- }else if(event.equals(Event.USER_TIXIAN_DETAIL)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_tixian_detail;
|
|
|
- }else if(event.equals(Event.USER_BIND_PHONE)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_bind_phone;
|
|
|
- }else if(event.equals(Event.USER_BIND_WEIXIN)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_bind_weixin;
|
|
|
- }else if(event.equals(Event.USER_AUTHENTICATION)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_authentication;
|
|
|
- }else if(event.equals(Event.USER_LOGOUT)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.user_logout;
|
|
|
- }else if(event.equals(Event.GAME_SEARCH)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.game_search;
|
|
|
- }else if(event.equals(Event.GAME_DOWNLOAD_MANAGER)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.game_download_manager;
|
|
|
- }else if(event.equals(Event.GAME_DOWNLOAD)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.game_download;
|
|
|
- }else if(event.equals(Event.TASK_ACCEPT)){
|
|
|
- subType = AppStatisticsConfig.ClickSubType.task_accept;
|
|
|
- }
|
|
|
+ public static void onEvent(Event event){
|
|
|
+ MobclickAgent.onEvent(SheepApp.mContext,event.getKey());
|
|
|
|
|
|
- AppStatistics.getInstance().sendDataToServer(AppStatisticsConfig.SuperType.ONCLICK_EVENT,subType,"");
|
|
|
+ AppStatistics.getInstance().sendDataToServer(AppStatisticsConfig.SuperType.ONCLICK_EVENT, event.getId(),"");
|
|
|
|
|
|
}
|
|
|
|