Skip to main content

Working with sessions


This topic describes the basics of using sessions in Interana. This topic expands on the Sessions topic of the Live Demo Guide, and also uses the Wikipedia demo set.

Use sessions to measure user engagement

For each user, you want to measure the number of sessions where they edited one or more Wikipedia articles. The session will stop when the user is inactive for 60 minutes or more. Call this an “Engaged session.” This creates the automatically generated session metric 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:

Use sessions to build metrics

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:

Use sessions to build cohorts

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:

Chart 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.

Group by example: grouping by location

You can quickly compare the average duration of average engaged sessions by country. Measure by the average Engaged session.Edits per session, then group by

We can see that there's a spike in edits from users in Croatia on March 9. We can get more detail by switching to the Samples view and adding two filters: is one of Croatia and type is one of edit.  Now we can see which articles were the focus of this activity:

  • Was this article helpful?