Skip to content

asku/cordova-mixpanel-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Plugin that wraps Mixpanel sdk for android and ios

Install

cordova plugin add https://github.com/samzilverberg/cordova-mixpanel-plugin.git

Usage

window.mixpanel:

  • alias(aliasId, originalId, onSuccess, onFail)
    • also available as createAlias
  • distinctId(function onSuccess(distinctId) {}, onFail)
  • flush(onSuccess, onFail)
  • identify(distinctId, onSuccess, onFail)
  • init(token, onSuccess, onFail)
  • register(superProperties, onSuccess, onFail)
  • reset(onSuccess, onFail)
  • track(eventName, eventProperties, onSuccess, onFail)

window.mixpanel.people:

  • identify(distinctId, onSuccess, onFail)
  • set(peopleProperties, onSuccess, onFail)
  • registerPushToken(apnsOrGcmToken, onSuccess, onFail)

TODOs

  • check if sdks need to be updated
  • publish to npm
  • add more Mixpanel People operations
    • set once, unset, increment, delete (more?)
  • make sure ios/android use same error messages
  • refactor ios code
    • remove code duplication of checking that mixpanel was init

Troubleshooting

IOS

hey i installed the plugin and now build fails, why?

open your xcode proj, goto build phases -> link binary with libraries:

  • drag all files under folder 'frameworks' (on the left) to here
  • add the following if missing:
    • libicucore
    • cfnetwork

i get error 'Mixpanel' plugin not found, check config.xml

appears to be some problem of the xcode proj settings. only working solution i found so far is to

cordova platform remove ios
cordova platform add ios
cordova build ios

and setting up the build phase correctly again, as described in last question.

Keywords

mixpanel, plugin cordova, phonegap, ionic, android, ios

About

A Cordova Plugin that wraps Mixpanel's sdk

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Objective-C 96.0%
  • Java 1.5%
  • C 1.4%
  • Other 1.1%