Creating a Funnel with an OR Condition

Say you want to know, of all of the users who signed up, how many CREATED a post OR RESPONDED to a post?

There is no built-in “OR” functionality in Keen funnels, but there is a way to use a little bit of logic to get the same result.

This imaginary funnel’s steps might look like this:

steps:[
    {
      event_collection:"signed_up",
      actor_property:"user.id"
    },
    {
      // this is not real code, it's a sample to illustrate what we're trying to do
      event_collection: "created" OR "responded",
      actor_property:"user.id"
    }
]

Here is an ACTUAL solution that works!

Solution:

steps:[
    {
      event_collection:"signed_up",  // total signups
      actor_property:"user.id"
    },
    {
      event_collection: "created" // users who did NOT create
      actor_property:"user.id",
      inverted: true
    },
    {
      event_collection: "responded"  // users who did NOT create and did NOT respond
      actor_property:"user.id",
      inverted: true
    }
]

result: [100, 80, 70]
result[0] = total users in cohort
result[1] = total users who DID NOT create
result[2] = total users who DID NOT create AND DID NOT respond

users retained = result[2] - result[0] = 30
retention = 30/100 = 30%

This works but it’s not super intuitive and requires hacking the JS library a bit to be able to display it correctly.