I'm trying to implement an app that will use two features of the mixpanel:
1. Track activity and analytics
2. Work with push notifications (creating/tracking)
For first task I'm using angular-mixpanel module and it works perfectly. But I cant use the same module for the second task because this module has no methods needed for push notifications. First I want connect push notifications for Android. Mixpanel guide for Android contains sample of code to handle registration: public void registerPush(GoogleCloudMessaging gcm){
String registrationId = gcm.register("YOUR_SENDER_ID");
MixpanelAPI.People people = mMixpanel.getPeople();
people.identify("USER_DISTINCT_ID");
people.setPushRegistrationId(registrationId);
}
I found only two plugins which can regiser token for push notifications (people.setPushRegistrationId()
):
-
cordova-mixpanel
this one looks good but lacks Android support. -
cordova-mixpanel-plugin
this plugin has the methodwindow.mixpanel.people.setPushId()
but I it doesn't works. I tried send push notifications to my device using mixpanel account, but I get no any result.
I'm sure what I used correctly all data (Google Cloud Messaging token, mixpanel app token and etc.) because tracking activity works correctly and I see data in the mixpanel. I think my device can't register in the mixpanel for notifications. I don't know how I can check it.
What do you think about it? Has someone solved the similar problem?
I will be glad of any information. If you have something you'd like to share, please send me an email at martynov.max.dunice@gmail.com
Thanks in advance!
Max