com.github.jobs.utils
Class AnalyticsHelper

java.lang.Object
  extended by com.github.jobs.utils.AnalyticsHelper

public final class AnalyticsHelper
extends Object

Author:
Evelio Tarazona Cáceres , Cristian

Field Summary
static String ACTION_APPLY
           
static String ACTION_BACK
           
static String ACTION_CANCEL
           
static String ACTION_EMAIL
           
static String ACTION_FOLLOW_CONTEXT
           
static String ACTION_OPEN
           
static String ACTION_OPEN_CONTEXT
           
static String ACTION_REMOVE
           
static String ACTION_SEARCH
           
static String ACTION_SHARE
           
static String ACTION_SWIPE
           
static String CATEGORY_ABOUT
           
static String CATEGORY_JOBS
           
static String CATEGORY_SEARCH
           
static String CATEGORY_SUBSCRIBE
           
static String LABEL_APPLY
           
static String LABEL_CONTACT
           
static String LABEL_DETAILS
           
static String LABEL_DIALOG
           
static String LABEL_FROM_DETAILS
           
static String LABEL_LEFT
           
static String LABEL_RIGHT
           
static String LABEL_SHARE
           
static String NAME_DETAILS
           
static String NAME_EDIT_TEMPLATES
           
static String NAME_HOME
           
static String NAME_HOW_TO_APPLY
           
static String NAME_SEARCH_DIALOG
           
static String NAME_SUBSCRIBE_DIALOG
           
static String NAME_TEMPLATES
           
 
Constructor Summary
AnalyticsHelper(android.content.Context context)
           
 
Method Summary
static AnalyticsHelper getTracker(android.content.Context context)
           
 void onActivityRetainNonConfigurationInstance()
          Must be called by the activity previously used in any onActivity* method in its onRetainNonConfigurationInstance method
 void onActivityStarted(android.app.Activity activity)
          Must be Called when activity is started, aka onStart
 void onActivityStopped(android.app.Activity activity)
          Must be Called when activity is stopping, aka onStop
 void trackEvent(String category, String action, String label)
          Track an Event.
 void trackPageView(String name)
          Track a pageview, which is analogous to an Activity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_SEARCH

public static final String CATEGORY_SEARCH
See Also:
Constant Field Values

CATEGORY_ABOUT

public static final String CATEGORY_ABOUT
See Also:
Constant Field Values

CATEGORY_JOBS

public static final String CATEGORY_JOBS
See Also:
Constant Field Values

CATEGORY_SUBSCRIBE

public static final String CATEGORY_SUBSCRIBE
See Also:
Constant Field Values

ACTION_OPEN

public static final String ACTION_OPEN
See Also:
Constant Field Values

ACTION_EMAIL

public static final String ACTION_EMAIL
See Also:
Constant Field Values

ACTION_REMOVE

public static final String ACTION_REMOVE
See Also:
Constant Field Values

ACTION_APPLY

public static final String ACTION_APPLY
See Also:
Constant Field Values

ACTION_BACK

public static final String ACTION_BACK
See Also:
Constant Field Values

ACTION_SHARE

public static final String ACTION_SHARE
See Also:
Constant Field Values

ACTION_SWIPE

public static final String ACTION_SWIPE
See Also:
Constant Field Values

ACTION_FOLLOW_CONTEXT

public static final String ACTION_FOLLOW_CONTEXT
See Also:
Constant Field Values

ACTION_OPEN_CONTEXT

public static final String ACTION_OPEN_CONTEXT
See Also:
Constant Field Values

ACTION_CANCEL

public static final String ACTION_CANCEL
See Also:
Constant Field Values

ACTION_SEARCH

public static final String ACTION_SEARCH
See Also:
Constant Field Values

LABEL_DIALOG

public static final String LABEL_DIALOG
See Also:
Constant Field Values

LABEL_LEFT

public static final String LABEL_LEFT
See Also:
Constant Field Values

LABEL_RIGHT

public static final String LABEL_RIGHT
See Also:
Constant Field Values

LABEL_FROM_DETAILS

public static final String LABEL_FROM_DETAILS
See Also:
Constant Field Values

LABEL_DETAILS

public static final String LABEL_DETAILS
See Also:
Constant Field Values

LABEL_APPLY

public static final String LABEL_APPLY
See Also:
Constant Field Values

LABEL_CONTACT

public static final String LABEL_CONTACT
See Also:
Constant Field Values

LABEL_SHARE

public static final String LABEL_SHARE
See Also:
Constant Field Values

NAME_HOME

public static final String NAME_HOME
See Also:
Constant Field Values

NAME_SEARCH_DIALOG

public static final String NAME_SEARCH_DIALOG
See Also:
Constant Field Values

NAME_SUBSCRIBE_DIALOG

public static final String NAME_SUBSCRIBE_DIALOG
See Also:
Constant Field Values

NAME_DETAILS

public static final String NAME_DETAILS
See Also:
Constant Field Values

NAME_HOW_TO_APPLY

public static final String NAME_HOW_TO_APPLY
See Also:
Constant Field Values

NAME_TEMPLATES

public static final String NAME_TEMPLATES
See Also:
Constant Field Values

NAME_EDIT_TEMPLATES

public static final String NAME_EDIT_TEMPLATES
See Also:
Constant Field Values
Constructor Detail

AnalyticsHelper

public AnalyticsHelper(android.content.Context context)
Method Detail

getTracker

public static AnalyticsHelper getTracker(android.content.Context context)

onActivityStarted

public void onActivityStarted(android.app.Activity activity)
Must be Called when activity is started, aka onStart

Parameters:
activity - Activity in onStart method

onActivityStopped

public void onActivityStopped(android.app.Activity activity)
Must be Called when activity is stopping, aka onStop

Parameters:
activity - Activity in onStop method

onActivityRetainNonConfigurationInstance

public void onActivityRetainNonConfigurationInstance()
Must be called by the activity previously used in any onActivity* method in its onRetainNonConfigurationInstance method


trackEvent

public void trackEvent(String category,
                       String action,
                       String label)
Track an Event.

Parameters:
category - the category of the event
action - the action of the event
label - the label of the event, can be null

trackPageView

public void trackPageView(String name)
Track a pageview, which is analogous to an Activity. If null is passed in as input, no pageview will be tracked.

Parameters:
name - The name of the Activity or view to be tracked.


Copyright © 2012. All Rights Reserved.