[2.13.0] bus/taxi司机端埋点优化

This commit is contained in:
wangmingjun
2022-12-14 17:38:41 +08:00
parent 07f11215c9
commit 23981ae0ff
2 changed files with 20 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ public class BusAnalyticsManager {
}
private void triggerStartAutopilotFailureEvent(String failCode, String failMsg){
if (mStartAutopilotParams.isEmpty()) return;
CallerLogger.INSTANCE.e( M_BUS + "triggerStartAutopilotFailureEvent", failMsg );
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_RESULT
, CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
@@ -54,6 +56,8 @@ public class BusAnalyticsManager {
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG, failMsg);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
}
@SuppressLint("NewApi")
@@ -69,6 +73,10 @@ public class BusAnalyticsManager {
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_FAILURE_MSG, "");
}
private void clearStartAutopilotParams(){
mStartAutopilotParams.clear();
}
/**
* 触发'开启自动驾驶'埋点流程
* 开启自动驾驶15s内成功则发送成功埋点否则发送失败埋点
@@ -99,6 +107,8 @@ public class BusAnalyticsManager {
removeWaitingCallback();
mStartAutopilotParams.put(BusConst.EVENT_PARAM_START_RESULT, true);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
} else {
UiThreadHandler.postDelayed(startAutopilotRunnable, BusConst.LOOP_PERIOD_15S);
}

View File

@@ -52,12 +52,20 @@ public class TaxiAnalyticsManager {
}
private void triggerStartAutopilotFailureEvent(String failCode, String failMsg){
if (mStartAutopilotParams.isEmpty()) return;
CallerLogger.INSTANCE.e(M_TAXI + "triggerStartAutopilotFailureEvent", failMsg);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, false);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_CODE, failCode);
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_FAILURE_MSG,
failMsg);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
}
private void clearStartAutopilotParams(){
mStartAutopilotParams.clear();
}
public void clearStartAutopilotFailureMSG(){
@@ -97,6 +105,8 @@ public class TaxiAnalyticsManager {
removeWaitingCallback();
mStartAutopilotParams.put(TaxiConst.EVENT_PARAM_START_RESULT, true);
AnalyticsManager.INSTANCE.track(mStartAutopilotKey, mStartAutopilotParams);
clearStartAutopilotParams();//清空参数数据,防止误传
} else {
UiThreadHandler.postDelayed(startAutopilotRunnable, TaxiConst.LOOP_PERIOD_15S);
}