The graph module allows you to construct powerful visualizations of your data over time. In the graph view, you can analyze any event, segment, or property and review multiple types of analysis on the same graph.
To create a graph, navigate to Analyze > Graph. From this page, all you need to do is select an event of interest from the drop-down and click the Run Query button.
Let’s look at the built-in pageview event. By default, Heap presents results per day, over the past week, as a line graph.
Query: Your query is made up of your chosen analysis type and event, as well as any filters, groupings, or segment comparisons.
Date Range: This is where you choose the date range over which you analyze your data. By default, Heap will set the date range of the graph to the previous 7 days. The graph view supports the following ranges:
- Past 7 Days
- Past 30 Days
- Past 90 Days
- Past Year
- Date To Now
- Choose a Date Range (a custom date range)
Granularity: This value determines the interval by which we view the analysis – either by Hour, Day, Week, or Month. By default, this value is set to Day. Intervals refer to calendar days, weeks, and months, rather than a rolling 1, 7, or 30-day window.
Changing the granularity affects the way we calculate average time between and conversion rate between in the graph view. In both views, the granularity (24 hours, 7 days, 30 days) represents the window of time the user has to complete both events in order to be included in the calculation.
Using the Entire Range option allows you to calculate the number of total users in a time-bounded segment, and the number of unique users who performed an action. You can also use this to calculate the total revenue across an entire date range.
Chart Type: A line chart is the default chart type, but Heap supports analyzing your data as a bar graph, pie chart, or in table format as well.
Hide Today / Hide Current Time Period: The hide today or hide current week/month toggle hides the last time step from the chart. For example, if today is Nov. 19, and you have a chart for a line graph from Nov. 13 – Nov. 19, switching hide today on will remove Nov. 19 from the chart. Note that this toggle does not appear if the granularity of the chart is set to hourly, or if you are graphing a time range in the past.
Trailing Average: The trailing average checkbox changes your graph from individual day counts to the average of the past 7 days, 4 weeks, or 3 months depending on the chosen granularity.
Note that checking this box will cause your results to appear as calculated averages that look like decimals. If you want to see whole numbers only, uncheck this box.
For Custom Date Ranges, you need to pick the start date, followed by the end date. The shading on the calendar illustrates the range you’re selecting. For example:
As you can see from the resulting graph, the pageview count varied over the month analyzed from about 9,000 to 60,000 per day. Hovering near one of the data points, you can see the specific value based upon the granularity defined.
There are nine query types in Graph view, which you can find by clicking on the query drop-down.
Count, Count Unique
Count returns the number of times an event occurs each hour, day, week, or month. Count Unique returns the number of unique or individual users who have performed an event. For example, if Sally clicks the ‘sign in’ button 10 times, then Count Unique will return 1 because Sally is one user. (This replaces the unique checkbox from the old graph view.)
Number of Sessions
Shows the number of unique sessions in a given date range that contain an event of your choosing. You can combine this with Ratios to get the percentage of sessions where a given user action was taken.
Number of Users
Shows the number of unique users in a given date range who completed an event of your choosing.
Number of Accounts
Shows the number of unique accounts in a given date range who completed an event of your choosing.
Conversion Rate Between
Tracks the percentage of users who did event one and then did event two. As with Average Time Between, the amount of time a user has to complete events one and two is dependent on the granularity. If the granularity is a day, a user has 24 hours to complete both events; a week, 7 days; a month, 30 days.
For an example of how this works, see Calculate conversion rate between two events.
Average Time Between
Calculates the average time it takes to complete event two after having performed event one. Granularity plays a large role in how the average is calculated. The user has a window of time to complete a set of two events in order to be included in the graph. If the granularity is a day the user has 24 hours to complete the second event. If the granularity is a week, the user has 7 days. If the granularity is a month, the user has 30 days. If a user completes both events, the graph calculates the time between the first event and the first time the second event is completed, then returns the average across all users who have completed event one and event two within the window specified.
You can also use this graph to see time between two events, as detailed in Measure the average time between two events.
Sum, Average, Max, Min
When used with numerical event properties (e.g. total order amount), these functions graph the total, average (mean), or max/min per day/week/month, based on the chosen granularity.
Let’s return to our pageview graph example. Just like queries in other analysis views, we can add filter statements to our data. We’ll run a query to graph the unique count of users who visited from Facebook.
Heap’s graph view becomes even more powerful when using the group by clause to compare activity across different groups. Building upon the previous example, we could use the group by the tool to see the distribution of pageviews from Google based on device type. To do so, all you need to do is add a group by Device Type clause to the query.
In this example, we changed the Chart Type to Bar to better show the distribution of devices on which our users visited our website.
Heap’s group by clause can group graphs by a variety of parameters, such as whether someone has or has not done an event, the count of how many times someone has completed an action, whether they are in a segment, the first date of an event, or any other user or event property. You can also perform a double group by to add more complexity to your analysis.
If we want to know how membership in a segment affects a given analysis, we can group by a segment and see the data for users who are and who are not in the segment. For an example, check out See how long it takes users to convert.
Multi-Event Graphs (Multigraphs)
Heap’s graph view also supports viewing multiple events at once and comparing statistics between them. To set up a multigraph, click the ‘Add Graph’ button.
Here, we’ve created a graph that compares the average and sum of the property value from the Upgrade to Paid event and the count of users who have downgraded to a free account over the past 3 months.
This graph gives us some great information, but it’s a bit choppy. If we click the Trailing Average checkbox, it gives us a stronger sense of the trendline.
The Ratios button allows you to graph the ratio of one metric to another. It works by dividing the result of the first graph by the results of the second graph. In our first example, the first graph is the total number of users who have used a feature, which is divided by the results of the second graph, the total number of users who have used a feature in the past week. The result is the ratio, which in this example, represents your weekly usage for that feature.
You can also use the Display as Percentage toggle above the graph results to see this number represented as a percentage of users, as shown in the adoption rate use case farther down this page.
Measure Weekly Use of a Feature
For our first example, we want to know the average amount of times a user has used a feature over the past week. To measure this, we’ll graph the count for the event that represents feature use (in this case, running a query in Heap) over the number of users who have completed the event in the past 7 days, and set the date range to the past 30 days grouped by week.
In the resulting line graph, hover over the week you want to see the average for. For our example, the week of Aug. 18-24, we see that our users ran queries an average of 20-21 times.
You can also analyze your ratio of daily to monthly users by running the suggested report What is my ratio of daily active users to monthly active users?
Measure Adoption Rate
In another example, we want to know the percentage of active users who have used a feature (in this case, suggested reports) over a period of time.
To see your adoption rate, run the suggested report What percent of my monthly active users are using a feature? This report utilizes the percentage toggle, which allows you to see the ratio number as a percentage of graph A over B.
Limitations of Graphing Ratios
When graphing a ratio, it is currently not possible to:
- Graph multiple ratios at once
- Graph the ratio of a conversion rate, or of average time between
- Use Compare Segments feature
Limitations of Graphs
When using graphs, it is currently not possible to customize the range of values of the x-axis or the y-axis. As a workaround, you can download this data as a CSV, then use a program like Excel to re-create the graph and customize the axis. To download the data, click the Export to CSV icon in the top-right of your graph.
As a note, when you download this .csv file, the export will show up to 100,000 rows of data.
Go ahead and try graph view out yourself and feel free to reach out to firstname.lastname@example.org with any questions or feedback that you may have!