Commit e1fb515c by sikang

add event

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