Search code examples
iosobjective-cmixpanel

Mixpanel Push Notification ios


In a Mixpanel Admin,Under Notification,If I Filter a specified device as shown in below link (filter based on Email-> choose one Email to send to the corresponding device user) but 'Your filter returned no matching users' If I see Mixpanel.I need to add something in People Analytics.As this is a beginning to handle Notification.I have no idea why Its not matching user.

 [[Mixpanel sharedInstance] .people set:@{@"Email":[pre objectForKey:@"SignInUserEmailId"]}];

This is how I am tract it in Mixpanel People Analytics,Is It Right or anything else I need to do for People Analytics.


Solution

  • Finally I got an solution for Push Notification,

    Under 'didRegisterForRemoteNotificationsWithDeviceToken'

    Mixpanel *mixpanel = [Mixpanel sharedInstance];

    [mixpanel identify:@"123456"];

    [mixpanel.people addPushDeviceToken:usertoken];

    Thee addPushDeviceToken function will take care of the $union operation. In that example, the "123456" would be an example of the distinct ID you are registering that push token for. If you want to use the current distinct ID on the device, you would do [mixpanel identify:mixpanel.distinctId]