Package com.parse
Class ParseAnalytics
- java.lang.Object
-
- com.parse.ParseAnalytics
-
public class ParseAnalytics extends java.lang.Object
TheParseAnalytics
class provides an interface to Parse's logging and analytics backend. Methods will return immediately and cache requests (+ timestamps) to be handled "eventually." That is, the request will be sent immediately if possible or the next time a network connection is available otherwise.
-
-
Constructor Summary
Constructors Constructor Description ParseAnalytics()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <any>
trackAppOpenedInBackground(Intent intent)
Tracks this application being launched (and if this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push).static void
trackAppOpenedInBackground(Intent intent, SaveCallback callback)
Tracks this application being launched (and if this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push).static <any>
trackEventInBackground(java.lang.String name)
Tracks the occurrence of a custom event with additional dimensions.static void
trackEventInBackground(java.lang.String name, SaveCallback callback)
Tracks the occurrence of a custom event.static <any>
trackEventInBackground(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> dimensions)
Tracks the occurrence of a custom event with additional dimensions.static void
trackEventInBackground(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> dimensions, SaveCallback callback)
Tracks the occurrence of a custom event with additional dimensions.
-
-
-
Method Detail
-
trackAppOpenedInBackground
public static <any> trackAppOpenedInBackground(Intent intent)
Tracks this application being launched (and if this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push).- Parameters:
intent
- TheIntent
that started anActivity
, if any. Can be null.- Returns:
- A Task that is resolved when the event has been tracked by Parse.
-
trackAppOpenedInBackground
public static void trackAppOpenedInBackground(Intent intent, SaveCallback callback)
Tracks this application being launched (and if this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push).- Parameters:
intent
- TheIntent
that started anActivity
, if any. Can be null.callback
- callback.done(e) is called when the event has been tracked by Parse.
-
trackEventInBackground
public static void trackEventInBackground(java.lang.String name, SaveCallback callback)
Tracks the occurrence of a custom event. Parse will store a data point at the time of invocation with the given event name.- Parameters:
name
- The name of the custom event to report to Parse as having happened.callback
- callback.done(e) is called when the event has been tracked by Parse.
-
trackEventInBackground
public static void trackEventInBackground(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> dimensions, SaveCallback callback)
Tracks the occurrence of a custom event with additional dimensions. Parse will store a data point at the time of invocation with the given event name. Dimensions will allow segmentation of the occurrences of this custom event.To track a user signup along with additional metadata, consider the following:
Map
There is a default limit of 8 dimensions per event tracked.dimensions = new HashMap (); dimensions.put("gender", "m"); dimensions.put("source", "web"); dimensions.put("dayType", "weekend"); ParseAnalytics.trackEvent("signup", dimensions); - Parameters:
name
- The name of the custom event to report to Parse as having happened.dimensions
- The dictionary of information by which to segment this event.callback
- callback.done(e) is called when the event has been tracked by Parse.
-
trackEventInBackground
public static <any> trackEventInBackground(java.lang.String name)
Tracks the occurrence of a custom event with additional dimensions. Parse will store a data point at the time of invocation with the given event name. Dimensions will allow segmentation of the occurrences of this custom event.To track a user signup along with additional metadata, consider the following:
Map
There is a default limit of 8 dimensions per event tracked.dimensions = new HashMap (); dimensions.put("gender", "m"); dimensions.put("source", "web"); dimensions.put("dayType", "weekend"); ParseAnalytics.trackEvent("signup", dimensions); - Parameters:
name
- The name of the custom event to report to Parse as having happened.- Returns:
- A Task that is resolved when the event has been tracked by Parse.
-
trackEventInBackground
public static <any> trackEventInBackground(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> dimensions)
Tracks the occurrence of a custom event with additional dimensions. Parse will store a data point at the time of invocation with the given event name. Dimensions will allow segmentation of the occurrences of this custom event.To track a user signup along with additional metadata, consider the following:
Map
There is a default limit of 8 dimensions per event tracked.dimensions = new HashMap (); dimensions.put("gender", "m"); dimensions.put("source", "web"); dimensions.put("dayType", "weekend"); ParseAnalytics.trackEvent("signup", dimensions); - Parameters:
name
- The name of the custom event to report to Parse as having happened.dimensions
- The dictionary of information by which to segment this event.- Returns:
- A Task that is resolved when the event has been tracked by Parse.
-
-