Mixpanel

Using LOTaDATA SDK and Mixpanel together allows you to segment your users based on the places they visit and add a location-intelligence layer to your mobile engagement. You can, for example, segment and send push notifications to users whom you have qualified as ''Regular Restaurant Visitors' based on who visited the restaurant more than one time in the last week.

Android Integration

Start with the SDK integration guide and the Mixpanel integration guide. After integrating both libraries, you can forward campaigns events from LOTaDATA to Urban Airship.

To receive campaigns events from LOTaDATA, just call the method watchForCampaigns providing a listener for campaigns. In that listener you call the Mixpanel API in order to send the campaign event.

private static final String LOG_TAG = "MyGeotriggerHandler";
private static final String PROJECT_TOKEN = "YOUR_PROJECT_TOKEN";
...
MixpanelAPI mixpanel = MixpanelAPI.getInstance(getContext(), PROJECT_TOKEN);
mixpanel.identify("1234"); // Identify the device, if haven't already done so
LDEngagementListener mEngagementListener = new LDEngagementListener() {
@Override
public void onEvent(LDEngagement ldEngagement) {
String engagementID = ldEngagement.id;
//Send engagement ID to Mixpanel
mixpanel.track(engagementID);
}
};
//For simplicity, we're assuming that an instance of MomentsClient was already taken
if(mMomentsClient != null) mMomentsClient.trackEngagements(mEngagementListener);