Fixing task rabbit statistics reporting with login

pull/14/head
Andrew Shaw 13 years ago
parent 9ef1de188e
commit 7d45748a6c

@ -119,6 +119,7 @@ public class TaskRabbitActivity extends FragmentActivity {
private int currentSelectedItem = 0; private int currentSelectedItem = 0;
private View menuNav; private View menuNav;
private ImageView menuNavDisclosure; private ImageView menuNavDisclosure;
private boolean didReportStatistics = false;
private final List<TaskRabbitSetListener> controls = Collections.synchronizedList(new ArrayList<TaskRabbitSetListener>()); private final List<TaskRabbitSetListener> controls = Collections.synchronizedList(new ArrayList<TaskRabbitSetListener>());
@ -154,6 +155,7 @@ public class TaskRabbitActivity extends FragmentActivity {
public static final String TASK_RABBIT_CLIENT_ID = "fDTmGeR0uNCvoxopNyqsRWae8xOvbOBqC7jmHaxv"; //$NON-NLS-1$ public static final String TASK_RABBIT_CLIENT_ID = "fDTmGeR0uNCvoxopNyqsRWae8xOvbOBqC7jmHaxv"; //$NON-NLS-1$
public static final String TASK_RABBIT_CLIENT_APPLICATION_ID = "XBpKshU8utH5eaNmhky9N8aAId5rSLTh04Hi60Co"; //$NON-NLS-1$ public static final String TASK_RABBIT_CLIENT_APPLICATION_ID = "XBpKshU8utH5eaNmhky9N8aAId5rSLTh04Hi60Co"; //$NON-NLS-1$
public static final String TASK_RABBIT_ID = "id"; //$NON-NLS-1$ public static final String TASK_RABBIT_ID = "id"; //$NON-NLS-1$
private TaskRabbitTaskContainer taskRabbitTask; private TaskRabbitTaskContainer taskRabbitTask;
public TaskRabbitActivity() { public TaskRabbitActivity() {
@ -168,7 +170,6 @@ public class TaskRabbitActivity extends FragmentActivity {
loadLocation(); loadLocation();
setContentView(R.layout.task_rabbit_enter); setContentView(R.layout.task_rabbit_enter);
StatisticsService.reportEvent(StatisticsConstants.TASK_RABBIT_VIEW);
} }
public void showAddListPopover() { public void showAddListPopover() {
@ -206,12 +207,15 @@ public class TaskRabbitActivity extends FragmentActivity {
} }
} }
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
StatisticsService.sessionStart(this); StatisticsService.sessionStart(this);
if (!didReportStatistics) {
StatisticsService.reportEvent(StatisticsConstants.TASK_RABBIT_VIEW);
didReportStatistics = true;
}
populateFields(); populateFields();
showIntroDialog(); showIntroDialog();
} }
@ -688,7 +692,7 @@ public class TaskRabbitActivity extends FragmentActivity {
String url = TASK_RABBIT_URL + "/api/authorize?client_id=" + TASK_RABBIT_CLIENT_ID; //$NON-NLS-1$ String url = TASK_RABBIT_URL + "/api/authorize?client_id=" + TASK_RABBIT_CLIENT_ID; //$NON-NLS-1$
intent.putExtra(OAuthLoginActivity.URL_TOKEN, url); intent.putExtra(OAuthLoginActivity.URL_TOKEN, url);
this.startActivityForResult(intent, REQUEST_CODE_TASK_RABBIT_OAUTH); this.startActivityForResult(intent, REQUEST_CODE_TASK_RABBIT_OAUTH);
StatisticsService.reportEvent(StatisticsConstants.ACTFM_LOGIN_GL_START); StatisticsService.reportEvent(StatisticsConstants.TASK_RABBIT_LOGIN);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

@ -60,6 +60,7 @@ public class StatisticsConstants {
public static final String IDEAS_LINK_CLICKED = "ideas-link-clicked"; public static final String IDEAS_LINK_CLICKED = "ideas-link-clicked";
public static final String TASK_RABBIT_VIEW = "task-rabbit-view"; public static final String TASK_RABBIT_VIEW = "task-rabbit-view";
public static final String TASK_RABBIT_POST = "task-rabbit-post"; public static final String TASK_RABBIT_POST = "task-rabbit-post";
public static final String TASK_RABBIT_LOGIN = "task-rabbit-login";
public static final String TASK_ONE_WEEK = "task-created-one-week"; public static final String TASK_ONE_WEEK = "task-created-one-week";
public static final String TASK_TWO_WEEKS = "task-created-two-weeks"; public static final String TASK_TWO_WEEKS = "task-created-two-weeks";

Loading…
Cancel
Save