Skip to main content

 

Interana Docs

Creating a 2.x session using 3.x flows

0votes
49updates
184views
Jeff

This article shows you how to model a user session in Interana and run queries to count the number of sessions per week, find the longest session each week, and find out the largest number of a specific event within a session each week. Our example uses a movies dataset, and we discover the movies watched within a session each week.

Goal

The following sections demonstrate how to accomplish these tasks with Interana 2.25 and Interana 4.x for comparison, so you'll understand the differences:  

  1. Look at an overview of the data.
  2. Create a custom object for use in queries.
  3. Run a query to count user sessions.
  4. Run a query to find the longest user session each week.
  5. Create a custom definition for movies watched during each session. 

Step 1: Look at an overview of the data

This step demonstrates how to measure select session-related properties on a weekly basis, where each user session is defined by a 30-minute timeout. In our example, we use a simulated "movies" dataset in which users engage with an online streaming movie site. You can perform the same tasks using your own dataset.

To start, we have two versions of Interana running side by side—on the left is version 2.25 and on the right is version 4.x. In Explore, we ran a query to look at the last 180 days of data on a weekly basis.

1.png

To get exactly the same results across Interana versions, we need to carefully match the way time is selected. In Interana 2.25, we chose "180 days ago to today", which is calendar-aligned to the beginning of the current day. In Interana 4.x, we chose "180 days ago to now", which is also calendar-aligned to the beginning of the current day.

Step 2: Create a custom object for use in queries

This step demonstrates how to create a custom object (property) that we'll use in our queries.

  • In Interana 2.25, click Sessions, then in the top right corner, click New Session.
  • In Interana 3.x, click Data, then Flows. In the top right corner, click New Flow.

clipboard_edd823f336c2291eeae5fd611f7f75d9c.png2.png

New Session (2.25) button in the screen on the left. New Flow (in 4.x) button in the screen on the right.

3.png

In 2.25, in the New Session dialog, do the following:
  1. Select a dataset. In our example, we selected movies.
  2. Enter a Name for the session. In our example, we entered 30 min session.
  3. In the Session For Each drop-down menu, choose user
  4. Configure New session when to be 30 minutes inactive.
  5. Add a descriptive explanation in the Description field.
  6. Click Save in the bottom right corner of the window.

clipboard_ea29bb57a2429f5e000a6fa552864119a.png

In the Interana 4 Flow builder, do the following:
  1. Enter a Name for the session. In our example, we entered 30 min session.
  2. In the Actor drop-down menu, choose user.
  3. For Flow ends after inactivity of, click no timeout and enter 30 minutes. Accept the default for Flow ends after total time
  4. Accept the default Filtered to all events.
  5. Since we'll only be using Step 1, click the minus () signs to delete Step 2 and Step 3 of the flow. 
  6. Rename Step 1 to In Session. Naming steps is encouraged, as it reduces confusion later on.  
    4.png
  7. Click the About tab and enter a descriptive explanation for the flow.
    5.png
  8. Click Save in the top right corner of the window.

Now that both objects are saved, we can view them in the object list.

6.png

Step 3: Run a query to count user sessions

This step demonstrates how to create and run a query that determines the total number of sessions across all users, on a weekly basis. 

To build the query in Interana 2, do the following:
  1. Click Explore in the left navigation bar.
  2. In the Measure section, choose Count Unique from the first drop-down menu.
  3. In the next line of the measure, select user (default value) and choose 30 min session from the drop-down menu.
  4. Click GO to run the query.

clipboard_ebc227b2df520cb4127fe5c9956f4e334.png 

To build the query in Interana 4, do the following:
  1. Click Explore in the left navigation bar.
  2. In the Show field, accept the default count aggregation.

Interana 4.x does not have separate count and count unique options in the dropdown. The UI text automatically updates between count and count unique as you select an object to count.

  1. After Show count, click events, then choose 30 min session from the drop-down menu. The sentence text automatically changes to: Show count number of instances of [30 min session].
  1. Click set 1 and enter the description Count of sessions. Adding a meaningful description for each set helps to prevent confusion for anyone who comes back to this query at a later time.
  2. Click GO to run the query.

7.png

Query results

8.png

Even though we were careful to match the time selection in 2.25 and 4.x, the time display is slightly different if you compare the two versions:

  • Interana 2: Time ending 12:00 AM (UTC) on 5/15/2018
  • Interana 4: 2018-05-08 00:00 UTC - 2018-05-14 24:00 UTC

clipboard_e3098fb0ee8ad0f69a7513d9e9adbd9e9.png

See Specify relative time in a query in the User's Guide for more information.

Step 4: Run a query to find the longest user session each week

This step demonstrates how to create and run a query that determines the length of the longest user session, on a weekly basis. 

To build the query in Interana 2, do the following:
  1. In the Measure section, click + Add Measure below the current measure.
  2. In the newly added measure, choose Maximum from the first drop-down menu.
  3. From the second drop-down menu, choose 30 min session.duration.
  4. At the bottom of the Measure section, click the Use Secondary Y-Axis checkbox.
  5. Click GO to run the query.
To build the query in Interana 4, do the following:
  1. Click compare to... below set 1 that was renamed Count of sessions. This adds another set.  
  2. In the Show section of the newly added set, click count and choose maximum from the drop-down menu.
  3. On the same line, in the second drop-down choose 30 min session.

The sentence text automatically changes to: Show maximum of total time in [30 min session]

  1. Click Set 2 and enter Longest session as the name. Adding a meaningful description for each set helps to prevent confusion for anyone who comes back to this query at a later time.
  2. Accept the Filtered to value: all 30 min session flows
  3. Click GO to run the query.
  4. Select CHART OPTIONS in the top right corner, then click the Show Multiple Axes checkbox and Apply.
  5. Click the chart title and enter Longest session vs. Count of sessions as the new title.

Query results

We now have the same query constructed in both Interana 2 and Interana 4. 

9.png

Step 5: Create a custom definition for movies watched during each session

This step demonstrates how to create a custom definition for a specific event in each session.

To create a custom definition in Interana 2, do the following:
  1. Click the Sessions icon in the left navigation bar.

2.x_Sessions_icon.png

  1. Find 30 min session in the list that appears on the left, and click the pencil icon to edit the definition.

2.x_Sessions_edit-icon.png

  1. Click + Add session metric.
  2. Enter a descriptive Name in the field. We entered Movies Watched in our example.
  3. In the MEASURE field, accept the default count events selection.
  4. In the Filter field, select the Basic radio option and configure a filter of action is one of watch_movie.
  5. Click Save.

2.x_Sessions_edit-dialog.png

To create a custom definition in Interana 4, do the following:
  1. Click Data in the left navigation bar, then click Flows.
  2. Locate the 30 min session in the list that appears at the right, and click the name to edit the definition.
  3. Click Properties in the top right corner of the window.
  4. In the resulting list view, click New Flow Property in the top right corner
  5. Enter a unique Name in the field at the top of the window. We entered Movies Watched for our example.
  6. In the Show field, accept the count of events defaults.
  7. In the Filtered to section, select all events and choose action from the drop-down menu.
  8. From the subsequent menu that appears, select a value. In our example, we chose watch_movie.
  9. Click Save in the top right corner of the window.

11.png

Step 6: Run a query to find the most movies watched during a session

This step demonstrates how to determine the greatest number of events generated by a user in a single session, on a weekly basis.

To build the query in Interana 2, do the following:
  1. Start from your previous query in the Explorer.
  2. In the Measure section, update the second measure to compute the maximum of the new property you just built. We selected the maximum of 30 min session.Movies watched, to replace 30 min session.duration.
  3. Click GO to run the query.
To build the query in Interana 4, do the following:
  1. Start from your previous query in the Explorer.
  2. In the second measure, select 30 min session within the sentence, and in the resulting drop-down menu choose Movies watched

The sentence text automatically changes to Show maximum of [Movies watched] filtered to all 30 min session flows.

  1. Edit title to read Max movies watched.
  2. Click GO to run the query. 

The results

The following screenshots show the side-by-side of the version 2 and version 4 query results:
12.png

  • Was this article helpful?