Core class for interacting with Mixpanel Analytics. More...
Classes | |
class | People |
Core interface for using Mixpanel People Analytics features. You can get an instance by calling Mixpanel.people More... | |
Static Public Member Functions | |
static void | Alias (string alias) |
Creates a distinct_id alias. More... | |
static void | ClearSuperProperties () |
Clear all super properties. More... | |
static void | ClearTimedEvents () |
Clears all current event timers. More... | |
static bool | ClearTimedEvent (string eventName) |
Clears the event timer for a single event. More... | |
static void | FlushQueue () |
Uploads queued data to the Mixpanel server. More... | |
static void | Identify (string uniqueId) |
Sets the distinct ID of the current user. More... | |
static void | Register (string key, Value value) |
Registers super properties, overwriting ones that have already been set. More... | |
static bool | RegisterOnce (string key, Value value) |
Registers super properties without overwriting ones that have already been set. More... | |
static void | Reset () |
Clears all distinct_ids, superProperties, and push registrations from persistent storage. Will not clear referrer information. More... | |
static bool | StartTimedEvent (string eventName) |
Start timing of an event. Calling Mixpanel.StartTimedEvent(string eventName) will not send an event, but when you eventually call Mixpanel.Track(string eventName), your tracked event will be sent with a "$duration" property, representing the number of seconds between your calls. More... | |
static bool | StartTimedEventOnce (string eventName) |
Begin timing of an event, but only if the event has not already been registered as a timed event. Useful if you want to know the duration from the point in time the event was first registered. More... | |
static void | Track (string eventName) |
Tracks an event. More... | |
static void | Track (string eventName, Value properties) |
Tracks an event with properties. More... | |
static bool | Unregister (string key) |
Removes a single superProperty. More... | |
Properties | |
static People | people [get] |
Return an accessor for Mixpanel people with a temporary distinct id. More... | |
Detailed Description
Core class for interacting with Mixpanel Analytics.
Create a GameObject and attach this Mixpanel component. Then, set the properties in the unity inspector (token, debug token, etc.)
Use the Mixpanel class to set up your project and track events in Mixpanel Engagement. Once you have a component, you can track events in Mixpanel Engagement using Mixpanel.Track(string eventName)
. You can also update People Analytics records with Mixpanel.people.
//Track an event in Mixpanel Engagement
Mixpanel.track("Hello World");
Mixpanel.Identify("CURRENT USER DISTINCT ID");
Mixpanel.people.Set("Plan", "Premium");
Member Function Documentation
|
inlinestatic |
Creates a distinct_id alias.
- Parameters
-
alias the new distinct_id that should represent original
|
inlinestatic |
Clear all super properties.
|
inlinestatic |
Clears the event timer for a single event.
- Parameters
-
eventName the name of event to clear event timer
|
inlinestatic |
Clears all current event timers.
|
inlinestatic |
Uploads queued data to the Mixpanel server.
|
inlinestatic |
Sets the distinct ID of the current user.
- Parameters
-
uniqueId a string uniquely identifying this user. Events sent to Mixpanel using the same disinct_id will be considered associated with the same visitor/customer for retention and funnel reporting, so be sure that the given value is globally unique for each individual user you intend to track.
|
inlinestatic |
Registers super properties, overwriting ones that have already been set.
- Parameters
-
key name of the property to register value value of the property to register
|
inlinestatic |
Registers super properties without overwriting ones that have already been set.
- Parameters
-
key name of the property to register value value of the property to register
|
inlinestatic |
Clears all distinct_ids, superProperties, and push registrations from persistent storage. Will not clear referrer information.
|
inlinestatic |
Start timing of an event. Calling Mixpanel.StartTimedEvent(string eventName) will not send an event, but when you eventually call Mixpanel.Track(string eventName), your tracked event will be sent with a "$duration" property, representing the number of seconds between your calls.
- Parameters
-
eventName the name of the event to track with timing
|
inlinestatic |
Begin timing of an event, but only if the event has not already been registered as a timed event. Useful if you want to know the duration from the point in time the event was first registered.
- Parameters
-
eventName the name of the event to track with timing
|
inlinestatic |
Tracks an event.
- Parameters
-
eventName the name of the event to send
|
inlinestatic |
Tracks an event with properties.
- Parameters
-
eventName the name of the event to send properties A JSONObject containing the key value pairs of the properties to include in this event. Pass null if no extra properties exist.
|
inlinestatic |
Removes a single superProperty.
- Parameters
-
key name of the property to unregister
Property Documentation
|
staticget |
Return an accessor for Mixpanel people with a temporary distinct id.
The documentation for this class was generated from the following file:
- Mixpanel.cs