- Which view/page is being viewed more in the app
- How much time user is spending on different app views.
- Which view/page user has not seen yet.
- Which button is being clicked maximum/minimum to track Call To Action (CTA)
- How user is navigating between different app views.
- Funnel Management based on user activity/event
This blog demonstrates how one can capture user activity in the Android app using App42 analytics feature which includes page/activity view and total time spent on a particular activity. We have created an Android sample app to demonstrate this and here are the steps to build and run this application.
- Register with App42 platform.
- Create an app once you are on Quick start page after registration.
- If you are already registered, login to AppHQ console and create an app from Create App button under App Manager Tab.
- Fill all the mandatory fields and get your APIKey and SecretKey.
- Download App42 Android sample app and unzip it on your machine .
- Open this Sample App in your eclipse IDE.
- Open the Constants.java in src of the package(app42Sample) and put your APIKey and SecretKey (which were received in step#2 or #3).
- Build and Run Sample App.
- This will open up login cum registration screen. Your app user needs to either login or register if using it for the first time.
- Once user is logged in, he will be taken to MainActivity page, click on Next button on this page and user will be navigated to SecondActivity. Similarly, from SecondActivity user will be navigated to ThirdActivity screen.
- Go to AppHQ Console , click on User Activity Tab on dashboard and you should be able to see complete track of user activity. This will show you how much time (in second) was spent by your app user on each activity in the tabular view as well as which activity is being viewed more in the pie chart.
public void onResume() {
super.onResume();
App42API.buildLogService().setEvent(this.getClass().getName(), "Landed", new App42CallBack() {
public void onSuccess(Object arg0) {
// TODO Auto-generated method stub
}
public void onException(Exception arg0) {
// TODO Auto-generated method stub
}
});
}
Similarly, it overrides onPause method of Android Activity by passing event “Escaped” in the event API as shown below.
public void onPause() {
super.onPause();
App42API.buildLogService().setEvent(this.getClass().getName(), "Escaped", new App42CallBack() {
public void onSuccess(Object arg0) {
// TODO Auto-generated method stub
}
public void onException(Exception arg0) {
// TODO Auto-generated method stub
}
});
}
Leave A Reply