The graph module in Heap 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.
The following Suggested Reports use the graphs module. Click any of the links and populate the fields provided to quickly get up and running with your first graph.
- Which countries are my visitors from?
- What are my daily/weekly/monthly user counts?
- Have the most viewed product categories changed since last week?
- Which marketing channels are driving my conversions?
- Which pages are landed on the most?
Setting Up a Graph
To create a graph from scratch, navigate to Analyze > Graph. From here, select an event of interest from the drop-down and click the Run Query button. For example, we’ll use the built-in pageview event.
Run Query Hotkey
You can also press Command + Enter (Mac) or Control + Enter (Windows) to run queries.
Here are the elements that make up a graph analysis:
Query: Your query is made up of your chosen analysis type and event, as well as any filters, groupings, or segment comparisons. In the screenshot above, the query is Count > Pageview.
Filters: This allows you to limit the results of your query to a specific subset based on user-level parameters, such as to exclude bot traffic or free users. For more info, see Filters.
Group By: This allows you to group together results based on a certain parameter, such as grouping pageviews by referrer or clicks by the title of the item clicked. For more info, see Group By.
Compare Users: This allows you to compare groups of users based on select criteria, like whether they have done or not done a certain action or belong to a certain segment. For more info, see Compare Groups of Users.
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 (grouped by): The second half of the date range field; 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.
In the example above, the Data Range is Past 30 Days, and the granularity (grouped by) is Day.
Changing the granularity affects the way we calculate average time between and conversion rate between (two types of queries) 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.
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:
Trailing Average: This 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.
The following options appear after you’ve clicked the Run Query button.
- Chart Type: A line chart is the default chart type, though Heap also supports the following formats: bar graph, pie chart, metric, and table.
- 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.
Once you’ve clicked Run Query, your results will look like this. They typically default to a line graph unless you are using certain ranges, like Entire Range.
As you can see, the pageview count varied over the month analyzed from about 10,000 to 80,000 per day. Hovering near one of the data points, you can see the specific value based upon the granularity defined.
For easy access to review and monitor your most important metrics, you can save any graph as a report by clicking the Save as Report button in the top-right.
You can pin reports to dashboards, organize related reports into categories, and add footnotes to graphs saved as reports. A footnote allows you to highlight a specific point in the graph and add a note about why this point is important.
For steps to add footnotes and more information on what you can do with reports, see Reports & Dashboards.
There are 11 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.
You’ll see the numbers in the results drop from before you added the filter, since you’re now only seeing data that matches this criteria.
For more information on how Filters work across all analysis modules, see Filters.
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 a group 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 the results, you’ll see different colored lines based on the groupings, with a legend on the side.
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.
Note that the results of this group are not bound by the date range applied to this query.
When grouping by a session-level property, if one of the property values has a strong correlation with a different property value, that information will appear when you click on the data point in your graph. This should help you more easily understand what behavior you’re looking at based on related behaviors.
As an example, let’s say you are graphing the count of blog post views grouped by UTM campaign, and in the line graph that appears, you click on a spike in pageviews for one particular blog post. If most of the pageviews of that blog post share the same properties, this information will be provided when you click on the data point.
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.
For our example, we’d like to compare usage of different features to understand which one is most popular.
The results allow us to compare trends.
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 Feb. 28-Mar. 6, we see that our users ran queries an average of 21-22 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 email@example.com with any questions or feedback that you may have!