Skip to main content
Interania

Creating a 2.x session using 3.x flows

0votes
28updates
20views

 Goal

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.

We show you how to accomplish the following tasks using both Interana 2.25 and Interana 3.0 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 3.0. In Explore, we ran a query to look at the last 180 days of data on a weekly basis.

clipboard_e62d54ac3292cc617d253040e1bbc443d.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 3.0, 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.

clipboard_edd823f336c2291eeae5fd611f7f75d9c.pngclipboard_eaed7455d0ec5fd21046deaf295ca1ae1.png

Now in the top right corner, click the New Session (in 2.25) or New Flow (in 3.0) button.

clipboard_e3d79fc0128fe787aa5934161835365e6.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 3.0 Flow builder, 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 Actor drop-down menu, choose user.
  4. For Flow ends after inactivity of, click no time out and enter 30 minutes. Accept the default for Flow ends after total time out
  5. Accept the default Filtered to all events.
  6. Since we'll only be using Step 1, click the minus () signs to delete Step 2 and Step 3 of the flow. 
  7. Rename Step 1 to In Session. Naming steps is encouraged, as it reduces confusion at a later time.  
  8. Click the About tab and enter a descriptive explanation for the flow.
  9. Click Save in the top right corner of the window.

clipboard_ec9e08ee4ec00de4840ee75af9efe2ed3.png

clipboard_e70b4cd5ba4106461abce84180f835a41.png

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

clipboard_e261f8d1e53f98e870e3a114bca1727e0.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.25, do the following:
  1. Click the Explore icon in the left navigation bar.
  2. In the Measure section, choose Count Unique from the first drop-down menu.
  3. In the Measure section, choose 30 min session from the second drop-down menu.
  4. Click GO to run the query.

clipboard_ebc227b2df520cb4127fe5c9956f4e334.png 

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

3.0 does not have separate count and count unique options. The count option counts events, and counts unique values of everything else.

  1. After Show count, click events, tjem 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.

clipboard_ec133d7c41dc90a76eb22aff19b16c570.png

Query results

clipboard_ef4a04d962d210ad2b85b7f23ee6d30e2.png

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

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

clipboard_e3098fb0ee8ad0f69a7513d9e9adbd9e9.png

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.25, 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 3.0, 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.25 and Interana 3.0. 

clipboard_ec181e118d33bfe1ceb6d2b7be76aaf54.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.25, 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 3.0, do the following:
  1. Click the Flows icon in the left navigation bar.

3.x_Flows-icon.png

  1. Locate the 30 min session in the list that appears at the right, and click the name to edit the definition.
  2. Click Properties in the top right corner of the window.

3.x_Flows_Properties-button.png

  1. In the resulting list view, click the New Flow Property button in the top right corner
  2. Enter a unique Name in the field at the top of the window. We entered Movies Watched for our example.
  3. In the Show field, accept the count of events defaults.
  4. In the Filtered to section, select all events and choose action from the drop-down menu.
  5. From the subsequent menu that appears, select a value. In our example, we chose watch_movie.
  6. Click Save in the upper right corner of the window.

3.x_MoviesWatched-property.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.25, 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 used the maximum of 30 min session.Movies watched, in place of 30 min session.duration.
  3. Click GO to run the query.
To build the query in Interana 3.0, 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. Change 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 2.25 and 3.0 query results:

clipboard_e77b3bf981f677116b760f5285edcd309.png

  • Was this article helpful?