Use the native Mixpanel Analytics SDK for iOS & Android in Titanium!
- An account on Mixpanel
-
initialize({ apiKey })
: Initialize the SDK -
logEvent(eventName, additionalParams)
: Log an event
-
loggingEnabled
: Whether or not logging should be enabled -
userID
: Set the user ID
import Mixpanel from 'ti.mixpanel';
const window = Ti.UI.createWindow();
const btn = Ti.UI.createButton({ title: 'Log event' });
btn.addEventListener('click', () => Mixpanel.logEvent('my_screen', { param: 1 }));
window.add(btn);
window.open();
MIT
Hans Knöchel