Let's start with the simple dataset I've been using for my previous blog posts:
Our dataset has 11 events that happen around 5AM on 11/15/2016. We have two user_ids (shard_keys) in our dataset.
Now let's create a funnel for each user_id with the following steps:
Step1: Log In - event_name is one of log_in Step2: View Page - event_name is one of view_page
Step3: Purchase - event_name is one of purchase Step4: Log Out - event_name is one of log_out
with our steps defined as follows:
So we have a funnel on our dataset for each user_id comprised of 4 steps where all events have to happen within 20 minutes of the first funnel event and we will not reset the funnel if an event matches Step 1.
The resulting visualization is as follows:
These numbers makes sense based on our dataset:
We have two user_ids who made it to step 1, two user_ids who made it to step 2, one user_id who made it to step 3, and one user_id who made it to step 4.
When we create a funnel, there are several metrics that are created:
Let's go through them one by one and see how they relate to our data:
The Funnel.Terminal_State is a metric calculated on a per-funnel instance basis. It returns the farthest step reached within the funnel instance. In the first funnel, user_id 1 made it as far as view_page so the funnel.terminal_state for that first funnel is equal to 2. In the second funnel, user_id 2 made it as far as log_out so the funnel.terminal_state for the second funnel is equal to 4.
The Funnel.Current_State is also a metric calculated on a per-funnel instance basis. It returns the most recent step reached within the funnel instance. In the first funnel, events 3, 4, and 5 will have a funnel.current_state of 2 since step 2 was the most recent step in the funnel (event 2). In the second funnel, events 8 and 9 will have a funnel.current_state of 2 since step 2 was the most recent step in the funnel (event 7).
The Funnel.transition_time_to_current_state is also a metric calculated on a per-funnel instance basis. It returns how long it took to get from the previous step to the current_state. Since it took 1 minute to get from step 1 of the funnel (event_number 1) to step 2 of the funnel (event_number 2), events 2-5 will have a funnel.transition_time_to_current_state of 1 minute since their Funnel.current_state metric=2.
The user_id.Funnel.time_between.1.2 is a metric calculated on a per-actor basis, not a per-funnel instance basis. It is an average of how long it took the user_id to go from step 1 to step 2 over all of their funnel instances.
In this case, user_id 1 had one funnel and it took 1 minute to get from step 1 to step 2. The user_id.Funnel.time_between.1.2 for user_id = 1 minute / 1 funnel = 1. Say that user_id had a second funnel during this time range where it took 2 minutes to get from step 1 to step 2. The user_id.Funnel.time_between.1.2 would then be (1 minute + 2 minutes) / 2 funnels = 1.5.
The same logic for user_id.Funnel.time_between.1.2 would apply to user_id.Funnel.time_between.2.3 and user_id.Funnel.time_between.3.4.
The user_id.max.funnel.terminal_state is a metric calculated on a per-actor basis. It returns for each user_id, what is the farthest point the user_id reached in the funnel over all of their funnel instances. The farthest that user_id 1 made it over all of their funnels is step 2 and the farthest that user_id 2 made it over all of their funnels is step 4.
In a later blog post, I'll talk about some ways to use these per-funnel metrics to do cool things in Interana!