The User sessions view in Heap allows you to see granular user-level data of how people are interacting with your site or app. It presents lists of users in reverse chronological order based on the most recent activity. For each person, Heap shows all user properties associated with that individual, as well as all their events grouped by sessions.
To get started, navigate to User sessions from the main nav in Heap. You can select a segment of your users and apply filters to only see user data for specific segments of users.
Web & Web Mobile
If you have Heap installed on your website and mobile app and data is being sent to the same environment, sessions to your website and mobile app will appear together in the session history for identified users.
Web sessions, which include sessions to your website from any mobile, tablet, or desktop device, can be identified by the specific platform and browser icons present on the right side of each session’s timestamp. You can hover over these icons to see the platform and browser details.
Here’s what the icon looks like for a web user:
Here’s what the icon looks like for a mobile web user:
Mobile sessions do not have these platform and device icons present next to the timestamp at this time. Mobile sessions can be identified by clicking on any event within the session and checking the Source metadata in the Event Properties pop-up. The source will be either iOS or Android for mobile sessions, even with React Native mobile apps. In contrast, the source for web sessions will always be Web.
Understanding the User sessions View
The following query shows us a chronological feed of our users, sorted by the last time we saw them. Each individual user entry shows their complete activity history on our app: pageviews, clicks, form submissions, touch events, and everything else that Heap tracks.
Running this query generates a full list of users, with your most recently active users at the top.
At the top of each user’s activity is their unique identifier, which by default is the Heap User ID, though you can replace this with either an email address or a handle via our Custom Identify API. In this example, we see that the email address is firstname.lastname@example.org and the user was last seen 10 minutes ago.
On the left-hand side of each user entry, we can see all user properties associated with this person. Heap automatically tracks a wealth of user attributes. For a full description of user properties captured by default, review our list of Autocaptured Data. Any custom properties sent via our Identify API are available in this list of properties.
Please note that you cannot assign attributes to users from this page. You can do this using the addUserProperties API.
For each user, Heap presents a list of all sessions in reverse chronological order. Each session shows the number of events Heap captured during the session and the duration of the session itself. Beneath the session description, the User sessions view highlights the most common defined events within the session.
If we open up the session, the User sessions view shows all events that Heap captures automatically, which includes both defined and raw events. If an event is a defined event, Heap shows the defined event with a title and color marker. If an event is raw or undefined, the User sessions view presents the event as a translucent object with the raw event name as the title.
When we click on one of the defined events, the User sessions view presents all event properties. By default, Heap captures event properties such as Path and Domain, though other properties such as Screen Dimensions can be included using Snapshots.
Excluding Events from the Users View
By default, Heap excludes the default Change Any Field, Click Any Element, and Submit Any Form events from the users view. This is because these events are generally too broad to result in any useful insights into user behavior.
You can click on any event to exclude it from the users view.
The count of excluded events will always be listed next to your users query.
Creating Events from the Users View
If you click on an undefined event, Heap presents the event properties as well as an input field to define the event.
Once you click Define, the event will become available in the Users view (Click Show Results) and all other Heap analysis views.
Extending The Users View
We can make the User sessions view more valuable by making more specific queries. The User sessions view allows you to graph any segment of users and to filter the results in the same manner as all other analysis views in Heap. For example, you may want to create a list of all Users that Google referred to my site. To do so, select the segment Users from the initial drop-down, and create a filter where Initial Referrer equals google.com.
The resulting list provides us a list of all users in the segment Active Users referred by google.com.
Export List as CSV
If the list returned by your query has several results, you can always export the list as a CSV, which includes the properties of the last 5,000 users that meet the query definition. Simply click Export to CSV under the Chart actions menu.
Creating Segments from the User sessions View
You can also save this Users report as a new segment by clicking the Save as Segment button in the top navigation bar.
The User sessions view can be a very useful view for debugging individual features. You can use the Highlight feature to easily spot an event of your choice when reviewing your list of user sessions.
To highlight an event, first, run a query, then select an event in the Hightlight drop-down.
When we review our list of user sessions, that event stands out as highlighted in a color, making it easy to identify.
By expanding the sessions, you can see what events happened before and after the event of interest, including both the virtual events you’ve defined and raw events, which makes this feature especially useful for identifying new virtual events to create and use in Funnels or other analyses.