Tracking User Activity

App42 Analytics enables App developers to analyze user behavior and take informed business decision on top of that. App42 Analytics feature is equipped with the Event API using which one can do the following analysis:

bullet Which view/page is being viewed more in the App

bullet How much time a user is spending on different App views

bullet Which view/page a user has not seen yet

bullet Which button is being clicked maximum/minimum number of times to track Call To Action (CTA)

bullet How is a user navigating between different App views

Tracking App User’s UI Views

One can track how much time a particular user has spent on a specific view/UI using the Event APIs. One has to call setEvent method on log service at the time of opening/resuming and closing/pausing of every UI/view. On opening of the UI, one has to pass “Landed” event value and on closing, “Escaped” event value along with name of the UI/view as shown in the code snippet below.

  • create User Api for Android
  • create User Api for J2ME
  • create User Api for Android
  • create User Api for iOS
  • create User Api for Java
  • create User Api for .NET
  • create User Api for Unity
  • create User Api for Ruby
  • create User Api for Rest
  •  create User Api for WP7/WP8
  • create User Api for Flash
//On Opening of every view/activity. In Android it could be placed inside onResume method of every activity
public void onResume() {
	super.onResume();
	String eventName = "Landed";  
	String moduleName = "Dashboard";
	logService.setEvent(moduleName,eventName,new App42CallBack() {
			public void onSuccess(Object arg0) {
				// TODO Auto-generated method stub
			}
			public void onException(Exception arg0) {
				// TODO Auto-generated method stub
			}
		});
}
//
//On Closing of every view
public void onPause() {
    super.onPause();
	String eventName = "Escaped";  
	String moduleName = "Dashboard";
	logService.setEvent(moduleName,eventName,new App42CallBack() {
			public void onSuccess(Object arg0) {
				// TODO Auto-generated method stub
			}
			public void onException(Exception arg0) {
				// TODO Auto-generated method stub
			}
		});
}
//
//On Opening of every view
//	
NSString *eventName = @"Landed";
NSString *moduleName = @"Dashboard";
[logService setEventWithName:eventName forModule:moduleName];
//
//On Closing of every view
//
NSString *eventName = @"Escaped";
NSString *moduleName = @"Dashboard";
[logService setEventWithName:eventName forModule:moduleName];
//On Opening of every view
public class Callback : App42Callback  
{ 
String eventName = "Landed";  
String moduleName = "Dashboard";	
logService.SetEvent(moduleName,eventName,this);
void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Console.WriteLine("Success response : " + response);  
	}  
}
//
//On Closing of every view
//
public class Callback : App42Callback  
{ 
String eventName = "Escaped";  
String moduleName = "Dashboard";	
logService.SetEvent(moduleName,eventName,this);
void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Console.WriteLine("Success response : " + response);  
	}  
}
//On Opening of every view
String eventName = "Landed";  
String moduleName = "Dashboard";
logService.setEvent(moduleName,eventName);
//
//On Closing of every view
//
String eventName = "Escaped";  
String moduleName = "Dashboard";
logService.setEvent(moduleName,eventName);
//On Opening of every view
var eventName = "Landed",
var moduleName = "Dashboard",
var result ;
logService.setEventWithModuleName(moduleName, eventName,{
	success: function(object) {
		test( "setEventwithModule", function() {
		var logObj = JSON.parse(object);
			console.log(logObj)
		});
	},
	error: function(error) {
		console.log(error)
	}
});
// 
//On Closing of every view
//
var eventName = "Escaped",
var moduleName = "Dashboard",
var result ;
logService.setEventWithModuleName(moduleName, eventName,{
	success: function(object) {
		test( "setEventwithModule", function() {
		var logObj = JSON.parse(object);
			console.log(logObj)
		});
	},
	error: function(error) {
		console.log(error)
	}
}); 
//On Opening of every view
String eventName = "Landed";  
String moduleName = "Dashboard";
logService.setEvent(moduleName,eventName);
//
//On Closing of every view
//
String eventName = "Escaped";  
String moduleName = "Dashboard";
logService.setEvent(moduleName,eventName);
//On Opening of every view
String eventName = "Landed";  
String moduleName = "Level1";	
App42Log.SetDebug(true);		//Print output in your editor console
logService.SetEvent(moduleName, eventName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		App42Log.Console("Success : " + response);
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
//
//On Closing of every view
//
String eventName = "Escaped";  
String moduleName = "Level1";	
App42Log.SetDebug(true);		//Print output in your editor console
logService.SetEvent(moduleName, eventName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		App42Log.Console("Success : " + response);
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
//On Opening of every view
String eventName = "Landed";  
String moduleName = "Dashboard";	
logService.SetEvent(moduleName,eventName);
//
//On Closing of every view
//
String eventName = "Escaped";  
String moduleName = "Dashboard";	
logService.SetEvent(moduleName,eventName);
Coming Soon
Coming Soon
//On Opening of every view
String eventName = "Landed"; 
String moduleName = "Level1";    
logService.setEventWithModuleName(moduleName , eventName,new callback());
class callback implements App42CallBack
{
	public function onSuccess(response:Object):void
	{	
		trace("response is:"+response)		
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
}
//
//On Closing of every view
//
String eventName = "Escaped"; 
String moduleName = "Level1";     
logService.setEventWithModuleName(moduleName , eventName,new callback());
class callback implements App42CallBack
{
	public function onSuccess(response:Object):void
	{	
		trace("response is:"+response)		
	}
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
}
Coming Soon

Analyzing User Activity From AppHQ Console

All logged activity by above explained methods would be available in your AppHQ Console Dashboard. One can analyze user activity from there and the report can be seen under User Activity tab. This report tells about each activity performed by individual users and tells how much time he is spending on each UI/view. This tab shows two views for the same, one is a pie chart and the other is a grid view as shown below.

Grid View

Grid view contains following information of user behavior

Device Id – Unique Device/Installation Id

User Name – Logged In User Name

Activity/UI/View Name – Activity/View/UI name on which user is looking at

SDK Name – Name of SDK from which user activity has been performed. Valid values are Android/iOS/WP/J2ME etc.

Time Spent in Seconds – Time spent by user on that Activity/UI/View

Start Time – Time at which the view was started/opened by user

End Time – Time when view was closed/user navigated to another activity

UserBehaviorGrid

Pie Chart View

This view contains Pie chart share of each Activity/UI/View based on its opening event. This view tells which Activity/View/UI is seen more in your App and which activity is not doing good or being seen less.

UserBehaviorGrid