Skip to main content
You are viewing the documentation for Interana version 2. For documentation on the most recent version of Interana, go to


Scuba Docs

Creating and using sessions


session is a sequence of consecutive events associated with a single actor. A session is typically identified in one of these ways:

  • All events that occur during a period of activity bounded by a specified period of inactivity
  • All events that occur between a “restart session” event

The most important use case and benefit of sessions is that they are read-time calculations, which allows you to do retroactive session creation and analysis. This means you don't need to generate a session ID during event collection, although you can still do that. You can create different session definitions per platform or create a single session across platforms. Interana allows you to specify the end of a session based on two criteria: inactivity and restart events. Inactivity is required and restart events are optional. 

Measure user engagement with sessions 

Let's start by creating an “Engaged session,” which measures the number of sessions when a user edited at least one article. Creating this session also creates an automatically generated session metric called Engaged session.duration, which is the length of any session that meets the requirements.

See Metrics, measures, and aggregators for more information about metrics and aggregators. 

We can also create metrics within the session definition to allow us to dig deeper into this information. With session metrics, you can build metrics that rely on the session definitions.

For example, we can build a session and use the custom session metrics to measure how people are using wikipedia:

  • Engaged session.Edits per session: counts the number of edits made during any "engaged" session. We use the type column to do this, which records the type of action performed.
  • Engaged session.New articles per session: counts the number of new articles created during any "engaged" session. 
  • Engaged session.Uploads per session: counts the number of files uploaded during any "engaged" session.

When you Explore from this session using the auto-generated metrics, Interana returns a graph of the average duration of the engaged sessions:


Building metrics with sessions

For each user who has engaged sessions, we can build a metric to measure the number of engaged sessions they have. To do this, we create a custom ratio measure where the numerator is a count of unique engaged sessions, and the denominator is a count of unique user IDs that have engaged sessions. The numerator is a count unique of the defined Engaged session, and the denominator counts the number of unique user IDs where the session metric Engaged session.events_count is greater than or equal to 1.

When you Explore using this metric, you can use the Table view to see the results:

Building cohorts with sessions

We can create a cohort of really engaged sessions, where we count the unique session IDs that have at least one session that is not only “engaged,” but where the user has edited at least 30 articles.

When you run Explore on the cohort, you can see the number of “really engaged sessions” compared to the total number of sessions:

Charting the distribution of sessions

We can also use the Distribution View to plot distribution charts based on the session metrics. For example, this query plots the distribution of edits for any engaged session. This example uses the Engaged session.Edits per session metric as a filter to show only the distribution of engaged sessions that included between 5 edits per session and 30 edits per session.  

You can click and drag over any section to drill into the graph for those values.