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@4
- 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)
If originalId is omitted, aliasId will be used as originalId.
Param | Type | Details |
---|---|---|
aliasId | string | |
originalId | string |
Returns: Promise<any>
distinctId()
Returns: Promise<any>
flush()
Returns: Promise<any>
identify(distinctId, usePeople)
The usePeople parameter is used for the iOS Mixpanel SDK.
Param | Type | Details |
---|---|---|
distinctId | string | |
usePeople | boolean |
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
append(appendObject)
Param | Type | Details |
---|---|---|
appendObject | any |
Returns: Promise<any>
deleteUser()
Returns: Promise<any>
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 | any |
Returns: Promise<any>
trackCharge(amount, chargeProperties)
Param | Type | Details |
---|---|---|
amount | number | |
chargeProperties |
Returns: Promise<any>
unset(propertiesArray)
Param | Type | Details |
---|---|---|
propertiesArray |
Returns: Promise<any>
union(unionObject)
Param | Type | Details |
---|---|---|
unionObject | any |
Returns: Promise<any>