Intro to Segments
To better understand particular cohorts of users, you can define segments to bring into your analysis. A segment in Heap is any subset of users based on a particular criteria defined by you. Examples of popular types of segments include:
- Frequent buyers where users have made more than a certain amount of purchases (ex. three purchases per month)
- Korra’s accounts where the Customer Success Manager of those accounts is Korra
- Internal users where you group together your employees based on email or IP address to exclude them from analytics tracking
- Canadian visitors where the users’ initial country is Canada
Note that segments only give you access to user-level properties. However, you can create and filter for an event to use as your segment.
Segment daily, weekly, or monthly active users
Heap comes with a set of predefined user segments for daily, weekly, and monthly active users. To learn more about how Heap measures these segments and how to set started with them, see How does Heap measure daily, weekly, and monthly active users?
Segment by users who started, stopped, or re-engaged with an event
Heap offers a suggested report that allows you to define user segments based on whether users have just started, consistently, stopped, never or re-engaged with a certain event. See our Active Usage Analysis guide to learn more.
To create a segment, navigate to Define > Segments within Heap and click the + New Segment button. On the page that appears, define the name, category, and filters for your segment.
A Segment can be defined based on any combination of behavioral actions and user-level properties. See the examples below of popular types of segments you can create in Heap.
Big Spenders (high purchase volume)
You could define a segment called Big Spenders for all users with greater than 10 purchases.
Power Users (completed an event multiple times)
You can track power users by defining a segment for all users who have done the event more than, say, 10 times per month.
My Accounts (account by CSM/AM)
You can segment users based on the Customer Success/Account Manager that owns those accounts via properties that come with our Salesforce Integration.
Internal Users (your employees)
We recommend creating a segment of your internal users to filter out of analysis so your results will be as accurate as possible. Here’s how we have that segment defined in Heap.
When conducting analysis in report modules later on, you can limit the data to users who are in any of these segments, or directly compare the behavior of one of these segments to users who do not fall into the segment. You can also directly compare multiple segments, such as the performance of cohorts from particular marketing channels.
Time-bounded segments are a type of segment that allow you to define a segment in terms of whether a user has done a specific event within the last day, week, or month. This means that the segment’s membership changes every day. These type of segments can be graphed using Size of Segment, or used as filters for other queries.
Let’s look at an example. You could define an Active Users segment as users who have logged in at least once within the last week.
Size of Segment
The size of a segment is calculated at midnight each day, and if you graph this for the prior 7 days segment using Size of Segment, each day’s data point will represent the number of users who logged in at least once in the past 7 days leading to that point. In prior day, it’s the past 24 hours.
The segment’s behavior changes when used as a filter. Unlike the above example, in a prior 7 days segment, a filter is applied to the event being analyzed, and is calculated as the prior 7 x 24 hours (168 hours) from the moment that the query is run. So, running a query for the Count of Sessions in the past month, filtered by users in our Active User segment is the same as saying, “Of all the users who have logged in at least once in the past 168 hours from now, show me the sessions they had each day in the past month”.
Reviewing & Updating Segment Details
Once you’ve defined a segment, you can review it by navigating to Define > Segments, searching for the segment, and clicking on it in the list that appears.
On the segment details page, you can see the following:
- An Analyze this segment option, which opens up a graph of the count of the segment over the past 7 days
- The segment history (when it was created, verified, and last edited)
- Any notes added to the segment
Directly below that, you’ll see an analysis preview, and below that, a section listing all of the Heap Connect destinations this segment is currently synced to.
You can edit the segment definition in the Edit Segment Criteria section further down the page, and review the full segment history at the bottom.
To categorize segments into categories, simply click the Uncategorized text when creating or editing the segment, then enter the category name. You can also create new categories in this area.
To categorize several segments at once, select the checkmark next to them where they are listed on the Segments page, then click Move at the top.
A pop-up will appear where you can select an existing category or create a new one by simply typing the new category name.
Exporting Segment Data
You can also export segment data to a CSV to analyze outside of Heap. To do so, select the checkmark next to them where they are listed on the Segments page, then click Export Metadata.
You’ll be prompted to select which types of metadata you want to export. Make your selections, then click Export Segments to download the file.
To archive a segment, from the Define > Segments page, click the segment to open up the event details, then click the archive icon in the top-right.
To archive multiple segments at once, from the segments tab, click the checkboxes next to the segments, then click the archive button at the top.
Restoring Archived Segments
See the Restoring Archived Definitions section of the Data Cleanup guide for complete steps to restore archived segments.