com.parse

## Class ParseAnalytics

- java.lang.Object
- - com.parse.ParseAnalytics

    public class ParseAnalytics
    extends Object

The `ParseAnalytics` 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 and Description
`ParseAnalytics()`

### Method Summary

Methods
`static void` `trackAppOpened(Intent intent)` Deprecated. Please use `ParseAnalytics.trackAppOpenedInBackground(android.content.Intent)` instead.
`static Task<Void>` `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 void` `trackEvent(String name)` Deprecated. Please use `ParseAnalytics.trackEventInBackground(String)` instead.
`static void` `trackEvent(String name, Map<String,String> dimensions)` Deprecated. Please use `ParseAnalytics.trackEventInBackground(String, java.util.Map)` instead.
`static Task<Void>` `trackEventInBackground(String name)` Tracks the occurrence of a custom event with additional dimensions.
`static Task<Void>` `trackEventInBackground(String name, Map<String,String> dimensions)` Tracks the occurrence of a custom event with additional dimensions.
`static void` `trackEventInBackground(String name, Map<String,String> dimensions, SaveCallback callback)` Tracks the occurrence of a custom event with additional dimensions.
`static void` `trackEventInBackground(String name, SaveCallback callback)` Tracks the occurrence of a custom event.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ParseAnalytics

    public ParseAnalytics()

### Method Detail

#### trackAppOpenedInBackground

    public static Task<Void> 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` - The `Intent` that started an `Activity`, if any. Can be null.
Returns:
  A Task that is resolved when the event has been tracked by Parse.

#### trackAppOpened

    @Deprecated
    public static void trackAppOpened(Intent intent)

Deprecated. Please use `ParseAnalytics.trackAppOpenedInBackground(android.content.Intent)` instead.

#### 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` - The `Intent` that started an `Activity`, if any. Can be null.
  `callback` - callback.done(e) is called when the event has been tracked by Parse.

#### trackEvent

    @Deprecated
    public static void trackEvent(String name)

Deprecated. Please use `ParseAnalytics.trackEventInBackground(String)` instead.

#### trackEventInBackground

    public static void trackEventInBackground(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.

#### trackEvent

    @Deprecated
    public static void trackEvent(String name,
                             Map<String,String> dimensions)

Deprecated. Please use `ParseAnalytics.trackEventInBackground(String, java.util.Map)` instead.

#### trackEventInBackground

    public static void trackEventInBackground(String name,
                              Map<String,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<String, String> dimensions = new HashMap<String, String>();
     dimensions.put("gender", "m");
     dimensions.put("source", "web");
     dimensions.put("dayType", "weekend");
     ParseAnalytics.trackEvent("signup", dimensions);

There is a default limit of 8 dimensions per event tracked.

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 Task<Void> trackEventInBackground(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<String, String> dimensions = new HashMap<String, String>();
     dimensions.put("gender", "m");
     dimensions.put("source", "web");
     dimensions.put("dayType", "weekend");
     ParseAnalytics.trackEvent("signup", dimensions);

There is a default limit of 8 dimensions per event tracked.

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 Task<Void> trackEventInBackground(String name,
                                    Map<String,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<String, String> dimensions = new HashMap<String, String>();
     dimensions.put("gender", "m");
     dimensions.put("source", "web");
     dimensions.put("dayType", "weekend");
     ParseAnalytics.trackEvent("signup", dimensions);

There is a default limit of 8 dimensions per event tracked.

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.