Skip to main content
Solved

Is there a way to query based on the last event a user performed?


Forum|alt.badge.img

Here’s the problem:

I’m trying to get to a total user count for our app. I setup a behavioral cohort and am querying based on user_id to get a sum of how many users we have. That said, this does not account for uninstalls, and so I am taking out anyone who performed an uninstall in x days. But...we have a number of users who uninstall and then reinstall our app.

Ideally I’d love to be able to query based on user_id, and exclude anyone whose final event was “uninstall”. Is there anyway to do this?

 

Best answer by Saish Redkar

Hey @RosieC. 

Interesting use case.
Afaik, the behavioral cohorts feature currently doesn’t support a final event clause for a user. Off the top of my head, I can’t think of any other charts which can enable this final event use case in a straightforward manner. 

 

But considering the nature of the use case I can think of the following by leveraging the relative count feature of cohorts.

Assuming every install App and uninstall App Events are captured accurately, let’s consider the following categories of users 

  1. Users who have installed and are actively using your app
  2. Users who have installed -→ use the app → uninstall the app → never come back again
  3. Users who have installed -→ use the app → uninstall the app → reinstall again → use the app ( this cycle can go n number of times ) 

So looking at that, we can consider that the number of install app events will be greater than the uninstall app events for a user to be captured in category #1 and #3.

 

So the cohort definition for users who are your active app users  ( who are using your the app and users who uninstalled, and started using the app again after reinstallation )  could be - 

 

Also, if you want a cohort just for users who uninstalled the app for good , then the following might help- 

 

 

Let me know if you see any logical errors in the above approach. There would be definitely other ways of solving this one.

Hope I have interpreted your use case correctly. 

Also, can you elaborate on the “querying based on user_id” part?

View original
Did this topic help you find an answer to your question?

3 replies

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1378 replies
  • Answer
  • June 18, 2021

Hey @RosieC. 

Interesting use case.
Afaik, the behavioral cohorts feature currently doesn’t support a final event clause for a user. Off the top of my head, I can’t think of any other charts which can enable this final event use case in a straightforward manner. 

 

But considering the nature of the use case I can think of the following by leveraging the relative count feature of cohorts.

Assuming every install App and uninstall App Events are captured accurately, let’s consider the following categories of users 

  1. Users who have installed and are actively using your app
  2. Users who have installed -→ use the app → uninstall the app → never come back again
  3. Users who have installed -→ use the app → uninstall the app → reinstall again → use the app ( this cycle can go n number of times ) 

So looking at that, we can consider that the number of install app events will be greater than the uninstall app events for a user to be captured in category #1 and #3.

 

So the cohort definition for users who are your active app users  ( who are using your the app and users who uninstalled, and started using the app again after reinstallation )  could be - 

 

Also, if you want a cohort just for users who uninstalled the app for good , then the following might help- 

 

 

Let me know if you see any logical errors in the above approach. There would be definitely other ways of solving this one.

Hope I have interpreted your use case correctly. 

Also, can you elaborate on the “querying based on user_id” part?


Forum|alt.badge.img
  • Author
  • New Member
  • 2 replies
  • June 20, 2021

This is really helpful. Thank you @Saish Redkar !!


Saish Redkar
Expert
Forum|alt.badge.img+10

@RosieC. 

Were you able to test this logic and get the desired cohort?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings