Note: We recommend using this set of instructions in cases where you want to filter for users who meet certain criteria based on data that exists only in your warehouse. For all other paths analysis cases, we recommend using the Paths module in Heap. See our Paths guide to get started.
This query allows you to monitor the most common flows through your product. As is, the SQL selects the first 5 events of every session consisting of at least five events. It then aggregates the number of users who have completed each flow and displays the top 20 most common paths. For example, looking at the table below, we see the most common user flow is
signup_enter_password and that this particular flow has occured 2791 times.
Heap is unique in the flexibility offered when defining events. A given
event_id across all Redshift or BigQuery tables corresponds with a unique event recorded by Heap. That said, the same
event_id may exist in multiple event tables. This is because Heap provides the flexibility to create multiple event definitions that correspond to the same raw event. For instance, you may define the following two events in the product:
Click CTAdefined as
Click on .cta
Click CTA - Homepagedefined as
Click on .ctawith a
filter where Path equals /
If a user clicks the CTA on the homepage, a new event will be recorded on both event tables because it corresponds with both event definitions. As a result, two events with the same event_id will be included in the all_events table, since it contains every recorded instance of all defined and custom events.
In order to select the events most valuable to you, when multiple events are firing at the same time, this query selects the events that are the most specific. This is based on the heuristic that events with more specificity are fired less overall then events with more general definitions. If you look at the example mentioned above, although two events are firing when a user clicks
.cta on the homepage, this query would only include the
Click CTA - Homepage event, rather than the global
Click CTA event, allowing you to have more insight into your users’ paths.
In Mode’s visualization, each block of color is representative of a particular event; it’s size is relative to the percentage of users who have completed that event. By hovering over a particular chain of events starting at the center of the circle, you can trace the relative and absolute percentage of users who have followed the path within your app.