Search code examples
iosiphoneanalyticsmixpanel

Users who have performed an action in Mixpanel


In Mixpanel you can track each action, like:

[mixpanel track:@"Watched Movie" properties:@{@"Movie ID”:@“1234", @"Movie Name”:@”Rocky 3"}];

And you can set user properties, like:

[mixpanel.people set:@{@"Eye Color":@"Blue"}];

When I want to send an email to a subset of users, I can narrow things down by asking for user properties - Eye Color:Green for instance.

But how do I get a subset of users who have performed a certain action - for instance "Watched Movie" with "Movie Name" "Rocky 3"?


Solution

  • As you have probably noticed, notifications can only be sent based on People Profile Properties. To segment people by events/send notifications based on events, you need to pass event data over to People by adding an extra line of code that sets the event as a people property. As of now, People and Engagement are two separate data sets. We're working on tying these data sets together more tightly, but for the moment they are not seamlessly integrated.

    In your example, we would need to fire a people.set as the user watched a movie called Rocky 3

    An example of this for iOS would be the following:

    [mixpanel.people set:@{@"Rocky 3 Viewed":@"True"}];
    

    Please feel free to write into [email protected] if you have any other questions!