Commit f699b29e by konghaorui

修复 登录埋点数据异常

parent 5992f71e
ext { ext {
kotlin_version = "1.3.21" kotlin_version = "1.3.21"
dev_mode = true dev_mode = false
ydl_app = [ ydl_app = [
appName : "心理咨询壹点灵", appName : "心理咨询壹点灵",
...@@ -46,7 +46,7 @@ ext { ...@@ -46,7 +46,7 @@ ext {
"m-confide" : "0.0.40", "m-confide" : "0.0.40",
"m-consultant" : "0.0.49", "m-consultant" : "0.0.49",
"m-fm" : "0.0.23", "m-fm" : "0.0.23",
"m-user" : "0.0.39", "m-user" : "0.0.41",
"m-muse" : "0.0.20", "m-muse" : "0.0.20",
"m-tests" : "0.0.14", "m-tests" : "0.0.14",
...@@ -65,7 +65,7 @@ ext { ...@@ -65,7 +65,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.28.3", "ydl-platform" : "0.0.29",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.28", "ydl-webview" : "0.0.28",
...@@ -105,7 +105,7 @@ ext { ...@@ -105,7 +105,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.28.3", "ydl-platform" : "0.0.29",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.28", "ydl-webview" : "0.0.28",
......
...@@ -19,8 +19,8 @@ class UserBIConstants { ...@@ -19,8 +19,8 @@ class UserBIConstants {
//百度监测 用户注册行为 //百度监测 用户注册行为
const val APP_REGISTER_PAGE = "app_register_page" const val APP_REGISTER_PAGE = "app_register_page"
const val POSITION_LOGIN_CLICK = "login_click" //登录点击 const val POSITION_LOGIN_CLICK = PART_ID_LOGIN_MAIN_PREFIX+"login_click" //登录点击
const val POSITION_LOGIN_SUCCESS_CLICK = "login_success_click" //登录成功点击 const val POSITION_LOGIN_SUCCESS_CLICK = PART_ID_LOGIN_MAIN_PREFIX+"login_success_click" //登录成功点击
//百度监测 应用启动 //百度监测 应用启动
const val POSITION_APP_START_UP_CLICK = "app_start_up_click" //应用启动 const val POSITION_APP_START_UP_CLICK = "app_start_up_click" //应用启动
...@@ -42,10 +42,10 @@ class UserBIConstants { ...@@ -42,10 +42,10 @@ class UserBIConstants {
* action type * action type
* 行为数据埋点,sign1字段 是对同一key下多种不同行为的描述 * 行为数据埋点,sign1字段 是对同一key下多种不同行为的描述
*/ */
const val ACTION_TYPE_CODE_LOGIN: String = PART_ID_LOGIN_MAIN_PREFIX+"code_login" //验证码登录 const val ACTION_TYPE_CODE_LOGIN: String = "code_login" //验证码登录
const val ACTION_TYPE_RESET_PWD: String = PART_ID_LOGIN_MAIN_PREFIX+"reset_pwd" //重置密码登录 const val ACTION_TYPE_RESET_PWD: String = "reset_pwd" //重置密码登录
const val ACTION_TYPE_PWD_LOGIN: String = PART_ID_LOGIN_MAIN_PREFIX+"pwd_login" //手机号密码登录 const val ACTION_TYPE_PWD_LOGIN: String = "pwd_login" //手机号密码登录
const val ACTION_TYPE_DIRECT_LOGIN: String = PART_ID_LOGIN_MAIN_PREFIX+"direct_login" //一键登录 const val ACTION_TYPE_DIRECT_LOGIN: String = "direct_login" //一键登录
const val ACTION_TYPE_QQ_THIRD_LOGIN: String = "qq_login" //QQ登录 const val ACTION_TYPE_QQ_THIRD_LOGIN: String = "qq_login" //QQ登录
const val ACTION_TYPE_WX_THIRD_LOGIN: String = "wx_login" //WX登录 const val ACTION_TYPE_WX_THIRD_LOGIN: String = "wx_login" //WX登录
} }
......
...@@ -16,9 +16,9 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils ...@@ -16,9 +16,9 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.router.im.IMLoginInfo import com.yidianling.router.im.IMLoginInfo
import com.yidianling.router.im.IMRequestCallback import com.yidianling.router.im.IMRequestCallback
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.UserConstants import com.yidianling.user.UserConstants
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.UserHttp import com.yidianling.user.http.UserHttp
import com.yidianling.user.http.UserHttpImpl import com.yidianling.user.http.UserHttpImpl
...@@ -134,7 +134,7 @@ class SmsLoginActivity : BaseActivity() { ...@@ -134,7 +134,7 @@ class SmsLoginActivity : BaseActivity() {
return return
} }
ActionCountUtils.count( UserBIConstants.ACTION_TYPE_CODE_LOGIN) ActionCountUtils.count( UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_CODE_LOGIN)
Log.e("短信验证码:", code + " - " + phoneNum + " - " + et_code.text.toString()); Log.e("短信验证码:", code + " - " + phoneNum + " - " + et_code.text.toString());
loginSub = userHttp.login(LoginParam(code, phoneNum, null, 2, et_code.text.toString())) loginSub = userHttp.login(LoginParam(code, phoneNum, null, 2, et_code.text.toString()))
...@@ -150,7 +150,7 @@ class SmsLoginActivity : BaseActivity() { ...@@ -150,7 +150,7 @@ class SmsLoginActivity : BaseActivity() {
if (it.firstLogin == 1) { if (it.firstLogin == 1) {
baiduActionBury() baiduActionBury()
}else { }else {
ActionCountUtils.countUid(it.uid!!,UserBIConstants.ACTION_TYPE_CODE_LOGIN) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,it.uid!!,UserBIConstants.ACTION_TYPE_CODE_LOGIN)
} }
ActivityManager.finishActivity(LoginActivity::class.java) ActivityManager.finishActivity(LoginActivity::class.java)
if (ActivityManager.getActivitySize() <= 1) { if (ActivityManager.getActivitySize() <= 1) {
......
...@@ -5,13 +5,12 @@ import android.text.TextUtils ...@@ -5,13 +5,12 @@ import android.text.TextUtils
import com.ydl.ydlcommon.mvp.base.BasePresenter import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.StringUtils import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.request.PhoneLoginPwdParam import com.yidianling.user.http.request.PhoneLoginPwdParam
import com.yidianling.user.http.request.PhoneResetPwdParam import com.yidianling.user.http.request.PhoneResetPwdParam
...@@ -39,7 +38,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II ...@@ -39,7 +38,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
*/ */
override fun resetPwd(newPassword: String, phone: String, msgCode: String, phoneCountryCode: String) { override fun resetPwd(newPassword: String, phone: String, msgCode: String, phoneCountryCode: String) {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_RESET_PWD) ActionCountUtils.count( UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_RESET_PWD)
var param = PhoneResetPwdParam(StringUtils.md5(newPassword), phoneCountryCode, msgCode, phone) var param = PhoneResetPwdParam(StringUtils.md5(newPassword), phoneCountryCode, msgCode, phone)
mModel.resetPwd(param) mModel.resetPwd(param)
...@@ -56,7 +55,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II ...@@ -56,7 +55,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
} else { } else {
ToastUtil.toastShort("修改密码成功") ToastUtil.toastShort("修改密码成功")
saveUserData(it.data) saveUserData(it.data)
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_RESET_PWD) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,it.data.uid!!,UserBIConstants.ACTION_TYPE_RESET_PWD)
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
// 重设密码登录已经不可能是首次登录,所以不进行百度埋点 // 重设密码登录已经不可能是首次登录,所以不进行百度埋点
//view.baiduActionBury() //view.baiduActionBury()
...@@ -77,7 +76,8 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II ...@@ -77,7 +76,8 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
override fun userLoginByPassword(inputPassword: String, phone: String, phoneCountryCode: String) { override fun userLoginByPassword(inputPassword: String, phone: String, phoneCountryCode: String) {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_PWD_LOGIN) ActionCountUtils.count( UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_PWD_LOGIN)
var param = PhoneLoginPwdParam(StringUtils.md5(inputPassword), phoneCountryCode, phone) var param = PhoneLoginPwdParam(StringUtils.md5(inputPassword), phoneCountryCode, phone)
...@@ -98,7 +98,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II ...@@ -98,7 +98,7 @@ class InputPassWordPresenterImpl : BasePresenter<IInputPassWordContract.View, II
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
mView.baiduActionBury() mView.baiduActionBury()
} else { } else {
ActionCountUtils.countUid(UserBIConstants.ACTION_TYPE_PWD_LOGIN,it.data.uid!!) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,it.data.uid!!,UserBIConstants.ACTION_TYPE_PWD_LOGIN)
} }
mView.closeActivity() mView.closeActivity()
} }
......
...@@ -6,14 +6,12 @@ import android.text.TextUtils ...@@ -6,14 +6,12 @@ import android.text.TextUtils
import com.umeng.socialize.bean.SHARE_MEDIA import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.mvp.base.BasePresenter import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.UserHelper import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.UserHttpImpl import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.http.request.BindPhoneJavaParam import com.yidianling.user.http.request.BindPhoneJavaParam
...@@ -59,7 +57,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -59,7 +57,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
override fun autoLogin(bean: PhoneLoginAutoParam) { override fun autoLogin(bean: PhoneLoginAutoParam) {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_DIRECT_LOGIN) ActionCountUtils.count( UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_DIRECT_LOGIN)
mModel.autoLogin(bean) mModel.autoLogin(bean)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -73,7 +71,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -73,7 +71,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
mView.baiduActionBury(it.data.uid, UserBIConstants.POSITION_ALIYUN_REGISTER_CLICK) mView.baiduActionBury(it.data.uid, UserBIConstants.POSITION_ALIYUN_REGISTER_CLICK)
} else { } else {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_DIRECT_LOGIN) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,it.data.uid!!,UserBIConstants.ACTION_TYPE_DIRECT_LOGIN)
} }
mView.autoLoginSuccess() mView.autoLoginSuccess()
...@@ -175,9 +173,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -175,9 +173,7 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
override fun loginByThird(activity: Activity, media: SHARE_MEDIA) { override fun loginByThird(activity: Activity, media: SHARE_MEDIA) {
val sign1 = if (media == SHARE_MEDIA.QQ) UserBIConstants.ACTION_TYPE_QQ_THIRD_LOGIN else UserBIConstants.ACTION_TYPE_WX_THIRD_LOGIN val sign1 = if (media == SHARE_MEDIA.QQ) UserBIConstants.ACTION_TYPE_QQ_THIRD_LOGIN else UserBIConstants.ACTION_TYPE_WX_THIRD_LOGIN
ActionCountUtils.count(UserHelper.getUserInfo()!!.uid, UserBIConstants.PART_ID_LOGIN_MAIN, ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_CLICK ,sign1)
UserBIConstants.POSITION_LOGIN_CLICK, "友盟三方登录url无法获取",
"友盟三方登录api无法获取", sign1)
UserHttpImpl.getInstance() UserHttpImpl.getInstance()
...@@ -203,17 +199,13 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra ...@@ -203,17 +199,13 @@ class LoginPresenterImpl(view: ILoginContract.View) : BasePresenter<ILoginContra
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_QQ_REGISTER_CLICK) mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_QQ_REGISTER_CLICK)
} else { } else {
ActionCountUtils.count(UserHelper.getUserInfo()!!.uid, UserBIConstants.PART_ID_LOGIN_MAIN, ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, "友盟三方登录url无法获取",
"友盟三方登录api无法获取", sign1)
} }
} else { } else {
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_WX_REGISTER_CLICK) mView.baiduActionBury(it.data.uid,UserBIConstants.POSITION_WX_REGISTER_CLICK)
} else { } else {
ActionCountUtils.count(UserHelper.getUserInfo()!!.uid, UserBIConstants.PART_ID_LOGIN_MAIN, ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, it.data.uid!!,sign1)
UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK, "友盟三方登录url无法获取",
"友盟三方登录api无法获取", sign1)
} }
} }
}, { }, {
......
...@@ -2,13 +2,12 @@ package com.yidianling.user.ui.login.presenter ...@@ -2,13 +2,12 @@ package com.yidianling.user.ui.login.presenter
import android.text.TextUtils import android.text.TextUtils
import com.ydl.ydlcommon.mvp.base.BasePresenter import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.request.BindPhoneJavaParam import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.request.PhoneLoginCodeParam import com.yidianling.user.http.request.PhoneLoginCodeParam
...@@ -129,7 +128,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -129,7 +128,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
* 验证码验证码登录 * 验证码验证码登录
*/ */
override fun loginByMsgCode(phone: String, phoneCountryCode: String, msgCode: String) { override fun loginByMsgCode(phone: String, phoneCountryCode: String, msgCode: String) {
ActionCountUtils.count(UserBIConstants.ACTION_TYPE_CODE_LOGIN) ActionCountUtils.count(UserBIConstants.POSITION_LOGIN_CLICK,UserBIConstants.ACTION_TYPE_CODE_LOGIN)
var param = PhoneLoginCodeParam(msgCode, phoneCountryCode, phone) var param = PhoneLoginCodeParam(msgCode, phoneCountryCode, phone)
mModel.loginByMsgCode(param) mModel.loginByMsgCode(param)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -146,7 +145,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -146,7 +145,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
mView.baiduActionBury() mView.baiduActionBury()
} else { } else {
ActionCountUtils.countUid(UserBIConstants.ACTION_TYPE_CODE_LOGIN,it.data.uid!!) ActionCountUtils.countUid(UserBIConstants.POSITION_LOGIN_SUCCESS_CLICK,it.data.uid!!,UserBIConstants.ACTION_TYPE_CODE_LOGIN)
} }
mView.closeActivity() mView.closeActivity()
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment