Commit e1fb515c by sikang

add event

parent de00e2fb
......@@ -159,6 +159,7 @@ public class AgreementPolicyActivity extends BaseActivity {
@Override
public void initView() {
TrackEventHelper.logEvent(TrackEvent.Screen.AGREEMENT);
EventBus.getDefault().register(this);
mCheckBox = findViewById(R.id.activity_policy_checkbox);
......@@ -185,13 +186,14 @@ public class AgreementPolicyActivity extends BaseActivity {
public void onEventClick(View v) {
if (v.getId() == R.id.activity_policy_ok_btn) {
if (mCheckBox.isChecked()) {
TrackEventHelper.logEvent(TrackEvent.Click.AGREE_PRIVACY);
PreferencesManager.get().setPolicyStatus(true);
PreferencesManager.get().setPolicyKSPStatus(true);
TrackEventHelper.logEvent(TrackEvent.Click.AGREE_PRIVACY);
setResult(RESULT_OK);
finish();
return;
} else {
TrackEventHelper.logEvent(TrackEvent.Click.AGREE_PRIVACY);
DialogFactory.showMessageDialog(AgreementPolicyActivity.this, getString(R.string.check_the_checkbox));
}
......@@ -214,9 +216,11 @@ public class AgreementPolicyActivity extends BaseActivity {
(dialog, which) -> {
dialog.dismiss();
if (which == 0) {
TrackEventHelper.logEvent(TrackEvent.Click.VIEW_NORMAL_AGREEMENT);
setTopBarTitle(policy);
loadPolicy();
} else {
TrackEventHelper.logEvent(TrackEvent.Click.VIEW_KSP_AGREEMENT);
setTopBarTitle(ksp_form);
loadKspPolicy();
}
......
......@@ -106,6 +106,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
@Override
public void accept(GatewayInfoBean gatewayInfoBean) throws Exception {
Gateway.setGatewayInfoBean(gatewayInfoBean);
TrackEventHelper.logEvent(TrackEvent.Api.GATEWAY_UPDATED);
if (!PreferencesManager.get().getBoolean("device_info_uploaded", false)) {
TrackEventHelper.logEvent(new Gson().toJson(DeviceUtils.getInstance().getDeviceInfo()));
TrackEventHelper.logEvent(DeviceUtils.getInstance().getActivePkgs(LibConfig.getContext(), 30));
......
......@@ -26,6 +26,11 @@ public final class TrackEvent {
public enum Screen implements Event {
/**
* 进入隐私协议页面
*/
AGREEMENT(type_user, action_screen, "agreement"),
/**
* 进入主页
*/
HOME(type_user, action_screen, "home"),
......@@ -91,6 +96,21 @@ public final class TrackEvent {
AGREE_PRIVACY(type_user, actoin_click, "agree_privacy"),
/**
* 切换到了KSP成员协议
*/
VIEW_KSP_AGREEMENT(type_user, actoin_click, "view_ksp_agreement"),
/**
* 切换到了隐私协议
*/
VIEW_NORMAL_AGREEMENT(type_user, actoin_click, "view_normal_agreement"),
/**
* 点击同意隐私协议,但由于没勾选协议无法提交
*/
AGREE_FAILED(type_user, actoin_click, "agree_failed"),
/**
* 点击一个产品
*/
PRODUCT_ITEM(type_user, actoin_click, "product_list"),
......@@ -196,6 +216,11 @@ public final class TrackEvent {
public enum Api implements Event {
/**
* gw刷新成功
* */
GATEWAY_UPDATED(type_user, actoin_click, "gateway_updated"),
/**
* FB登录成功
*/
ACCOUNT_KIT_LOGIN_SUCCESS(type_system, action_api, "accountkit_login_success"),
......
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