Package | com.mixpanel |
Class | public class Mixpanel |
Inheritance | Mixpanel ![]() |
Version 2.0.0
Method | Defined By | ||
---|---|---|---|
Mixpanel(token:String)
Create an instance of the Mixpanel library
| Mixpanel | ||
disable(events:Array = null):void
Disable events on the Mixpanel object. | Mixpanel | ||
identify(uniqueID:String):void
Identify a user with a unique id. | Mixpanel | ||
name_tag(name:String):void
Provide a string to recognize the user by. | Mixpanel | ||
register(properties:Object):void
Register a set of super properties, which are included with all
events/funnels. | Mixpanel | ||
register_once(properties:Object, defaultValue:* = null):void
Register a set of super properties only once. | Mixpanel | ||
set_config(config:Object):void
Update the configuration of a mixpanel library instance. | Mixpanel | ||
track(event:String, ... args):Object
Track an event. | Mixpanel | ||
unregister(property:String):void
Delete a super property stored with the current user. | Mixpanel |
Mixpanel | () | Constructor |
public function Mixpanel(token:String)
Create an instance of the Mixpanel library
Parameterstoken:String — your Mixpanel API token
|
disable | () | method |
public function disable(events:Array = null):void
Disable events on the Mixpanel object. If passed no arguments, this function disables tracking of any event. If passed an array of event names, those events will be disabled, but other events will continue to be tracked.
Note: this function doesn't stop regular mixpanel functions from firing such as register and name_tag.
Parameters
events:Array (default = null ) — A array of event names to disable
|
identify | () | method |
public function identify(uniqueID:String):void
Identify a user with a unique id. All subsequent actions caused by this user will be tied to this identity. This property is used to track unique visitors. If the method is never called, then unique visitors will be identified by a UUID generated the first time they visit the site.
Parameters
uniqueID:String — A string that uniquely identifies the user
|
name_tag | () | method |
public function name_tag(name:String):void
Provide a string to recognize the user by. The string passed to this method will appear in the Mixpanel Streams product rather than an automatically generated name. Name tags do not have to be unique.
Parameters
name:String — A human readable name for the user
|
register | () | method |
public function register(properties:Object):void
Register a set of super properties, which are included with all events/funnels. This will overwrite previous super property values. It is mutable unlike register_once.
Parameters
properties:Object — Associative array of properties to store about the user
|
register_once | () | method |
public function register_once(properties:Object, defaultValue:* = null):void
Register a set of super properties only once. This will not overwrite previous super property values, unlike register(). It's basically immutable.
Parameters
properties:Object — Associative array of properties to store about the user
| |
defaultValue:* (default = null ) — Value to override if already set in super properties (ex: "False")
|
set_config | () | method |
public function set_config(config:Object):void
Update the configuration of a mixpanel library instance.
The default config is:
{ // super properties span subdomains crossSubdomainStorage: true, // enable test in development mode test: false };
Parameters
config:Object — A dictionary of new configuration values to update
|
track | () | method |
public function track(event:String, ... args):Object
Track an event. This is the most important Mixpanel function and the one you will be using the most
Parameters
event:String — the name of the event
| |
... args — if the first arg in args is an object, it will be used
as the properties object. The last argument is a callback function.
The callback and properties arguments are both optional.
|
Object — the data sent to the server
|
unregister | () | method |
public function unregister(property:String):void
Delete a super property stored with the current user.
Parameters
property:String — the name of the super property to remove
|