In the fourth article of our behavioral analytics for products series, you’ll start understanding how to define a session. In product analytics, we’ve found that there can be a lot of confusion around what a session means and what it’s meant to express. Sessions are definable thanks to an implicit event property called a timestamp which is automatically logged for every event. Sessions are used to designate

1) a period in time during which a product is being used and;

2) the sequence of interactions.

Sessions from an experience design perspective

In user experience design a user path is laid out and translated into a set of screens and interactions. When a UX designer defines a user path it is intended to guide a user to a specific goal or action. It’s important to note that the operative word in the previous sentence is ‘intended.’ Product design has purpose, insofar as it serves the product designer’s own goals — to increase revenue or usage.

Sessions from a product analytics perspective

In product analytics, a user path is defined by a sequence of events. Only by understanding when an event takes place are we able to accurately understand whether or not the users of our application are abiding by our intended design. They allow us to answer questions about the effectiveness of design.

**Sessions are thus periods of use that group together events in an understandable way so that we can extract information about usage. **

Sessions have a beginning and an end. Before we can understand how a session begins, we must understand how and why a session ends. We naturally think of the end of a sequence of interactions as a last event. However, the idea of a last event is in itself difficult to define because an intended last event can potentially be followed by another event that signifies continued usage. As a result, the intended last event is not really a last event.

To deal with this issue of a last event, we use the concept of a last event in addition to a period of inactivity. Any event can be a last event, and a period of inactivity is a fixed period after which we assume that a user has stopped using the product. It’s extremely important to note that every product can use a different period of inactivity to close or end a session based on the intended use of that product.

How do companies like Google or Uber treat a session?

For example, Google might assume that when its users search, they’re attempting to access information related to a specific problem or question. If users stop searching after they have found an answer, then their session is over. As a result, Google may consider that a session is ended 30 minutes after a last interaction with its search engine.

In the case of Uber, a session might end 5 minutes after a ride is ended because Uber makes the assumption that a single ride is the most representative measure of a session. Its users are highly likely to not take a second Uber ride in the 5 minutes following the end of a first ride.

In the case that a user has never interacted with your product, then the beginning of a session is simply the first event. However, this is usually not the case, especially when referring to recurring users. When we refer to recurring users, the beginning of a session occurs when a first event is recorded anytime after the previous session is ended. And so, thanks to the end of a session, we’re easily able to define the beginning of a session.

Sessions from a football perspective

Let’s come back to the example we used in the last articles. If we considered Maradona as the user and the match as the session, how would you define the beginning and the end of the session? Would it be the whole match, from the kick off to the end of the game whistle? Or would it be from time 0 to the moment Maradona touched the ball?

From a product perspective, Maradona is the “user,” everything that happens during the match is an “event,” from goals to tackles and from handshakes to red cards. From a product perspective, Maradona doesn’t have to touch the ball to be part of the session. He’s interacting with the product, the game of football, by creating other kinds of events such as “tackling”, “falling” and “complaining.” If Maradona were the only point of analysis then there might be a justification to consider the session the moment he got on the field until, for example, a minute after he left. However, since most football matches measure the performance of a team, the 90-minute period of the match in addition to extra time would be considered the session.

Now let’s imagine that a better-positioned referee saw what you see in the image below and gave Maradona a red card.

maradona Understanding what's a session

In this case, the beginning of the session for Maradona would be the kickoff, but would the end be the minute after he received a red card since he would have stopped interacting with the match? Still, likely not, because he is one player in a product that measures team performance, not individual performance. Therefore, regardless of Maradona’s individual rapport with the match, he is still a user of a product that measures the performance of a team.

Editor’s note: This is the last of a series of 4 articles about the 3 components of behavioral analytics for products. You can access the other posts using the links below.

To get notified when our next article is out, please sign up for our newsletter.