ParseAnalytics

Class ParseAnalytics - Handles sending app-open and custom analytics events.

author

Fosco Marotto fjm@fb.com

package

Parse

Methods

Encodes and returns the given data as a json object

_toSaveJSON(array $data) : string
static

Arguments

$data

array

Data to encode

Response

string

Tracks the occurrence of a custom event with additional dimensions.

track(string $name, array $dimensions = array()) : mixed
static

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. Keys and values should be strings, and will throw otherwise.

To track a user signup along with additional metadata, consider the following:

$dimensions = array(
   'gender' => 'm',
   'source' => 'web',
   'dayType' => 'weekend'
);
ParseAnalytics::track('signup', $dimensions);

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

Throws
\Exception

Arguments

$name

string

The name of the custom event

$dimensions

array

The dictionary of segment information

Response

mixed