Heat maps are effective at communicating high and low periods for a metric. You might use heat maps to show how traffic to your site or usage of your product changes over time. You can also use heat maps to chart user retention and surface insights into which user cohorts are at risk of churning.
The example below shows the retention rates of various user cohorts over time. For more information on how to calculate user retention and churn rate, be sure to check out our playbook here.
Click Results à la Mode to create your own heat map. Learn more about using HTML to customize your reports.
Create a heat map
Add the stylesheet link and script tags to the top of the HTML:
<link rel="stylesheet" href="https://mode.github.io/alamode/alamode.min.css">
Add the customizable snippet at the bottom of the HTML:
query_name: "Customer Retention",
title: "Cutomer retention by user age",
pivot_label: "Periods out",
You can customize the heatmap by editing the parameters in the snippet:
html_element: If not provided, the funnel will be added as the last element in the report. To place it elsewhere, select an element in your report with this parameter.
query_name: The name of the query that returns the chart’s dataset. If you update the name of the query, you’ll need to update it here as well.
cohort_column: The dataset column that defines the cohort (each row) in the heatmap.
pivot_column: The dataset column that defines the pivoted variable (each column) in the heatmap.
value_column: The dataset column that defines the cell values in the heatmap.
total_column: The dataset column that defines the total size of each cohort (this parameter is optional).
title: The heatmap’s title.
pivot_label: The label at the top of the heatmap.
value_is_percent: Set to true if the values in the value_column should be shown as percentages.
color_gradient: A list of colors to show in the heatmap. Colors should be listed from low to high.
precision: This sets the number of decimal places for cells formatted as a percent.