Mixpanel
Cordova Plugin that wraps Mixpanel SDK for Android and iOS
Repo: https://github.com/samzilverberg/cordova-mixpanel-plugin
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-mixpanel $ npm install --save @ionic-native/mixpanel
- Add this plugin to your app's module
Supported platforms
- Android
- Browser
- iOS
Usage
import { Mixpanel } from '@ionic-native/mixpanel';
constructor(private mixpanel: Mixpanel, private mixpanelPeople: MixpanelPeople) { }
...
this.mixpanel.init(token)
.then(onSuccess)
.catch(onError);
Instance Members
alias(aliasId, originalId)
Param | Type | Details |
---|---|---|
aliasId |
string
|
|
originalId |
string
|
Returns: Promise<any>
distinctId()
Returns: Promise<any>
flush()
Returns: Promise<any>
identify(distinctId)
Param | Type | Details |
---|---|---|
distinctId |
string
|
Returns: Promise<any>
init(token)
Param | Type | Details |
---|---|---|
token |
string
|
Returns: Promise<any>
getSuperProperties()
Returns: Promise<any>
registerSuperProperties(superProperties)
Param | Type | Details |
---|---|---|
superProperties |
any
|
Returns: Promise<any>
registerSuperPropertiesOnce(superProperties)
Param | Type | Details |
---|---|---|
superProperties |
any
|
Returns: Promise<any>
unregisterSuperProperty(superPropertyName)
Param | Type | Details |
---|---|---|
superPropertyName |
string
|
Returns: Promise<any>
reset()
Returns: Promise<any>
timeEvent(eventName)
Param | Type | Details |
---|---|---|
eventName |
string
|
Returns: Promise<any>
track(eventName, eventProperties)
Param | Type | Details |
---|---|---|
eventName |
string
|
|
eventProperties |
any
|
optional |
Returns: Promise<any>
MixpanelPeople
Instance Members
identify(distinctId)
Param | Type | Details |
---|---|---|
distinctId |
string
|
Returns: Promise<any>
increment(peopleProperties)
Param | Type | Details |
---|---|---|
peopleProperties |
string
|
Returns: Promise<any>
setPushId(pushId)
Param | Type | Details |
---|---|---|
pushId |
Returns: Promise<any>
set(peopleProperties)
Param | Type | Details |
---|---|---|
peopleProperties |
Returns: Promise<any>
setOnce(peopleProperties)
Param | Type | Details |
---|---|---|
peopleProperties |
Returns: Promise<any>