The 2017 Ionic Developer Survey Results are in!

Mixpanel

Improve this doc

Cordova Plugin that wraps Mixpanel SDK for Android and iOS

Repo: https://github.com/samzilverberg/cordova-mixpanel-plugin

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-mixpanel
    $ npm install --save @ionic-native/mixpanel
    
  2. Add this plugin to your app's module

Supported platforms

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>

registerSuperProperties(superProperties)

Param Type Details
superProperties any

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>

API

Native

General