At Segment, we help companies record and manage their customer data. Our API has three basic methods: identify, track, and page/screen. These methods describe facts about customers. We often get asked why we don’t support recording sessions, and the short answer is that sessions aren’t facts, they’re stories.
Every piece of raw data that flows into Segment is a small fact.
analytics.identify(userid, traits); // who a customer is analytics.track(event, properties); // what the customer has just done or experienced analytics.page(name, properties); // where the customer is on the web analytics.screen(name, properties); // where the customer is in a mobile app
This raw factual data can be translated and forwarded out to any of our 131 partners who do analytics, behavioral email, A/B testing, CRMs, SMS, push notifications, you name it. Segment’s three main methods (surprisingly) cover all the bases in describing who, what and where customers are doing things.
But sessions are different. Sessions are actually an interpretation of the raw data. True, they’re based on the facts, but sessions are a story we build around the facts during our analysis. Take this example: a customer opens the app, they log in, they do some stuff, they close the app, they immediately reopen the app, and then close it for good. Boom, a session.
Two issues should immediately pop out:
- They closed the app in the middle. Did the session end there? Why not?
- When we say they “closed the app for good” does that mean 10 minutes? or 24 hours?
These questions about session length are important because they fundamentally change our interpretation of the underlying raw, factual data about what the user did.
For RunKeeper, a 10 minute session makes no sense. Most RunKeeper users run for longer than 10 minutes, which means there could easily be 10 minutes between UI interactions while they’re running. So 6 hours might be a good session cutoff for RunKeeper (those crazy marathon runners!). But a mobile game is completely different. For them, 10 minutes is a whole new gaming experience. If you disengaged for 10 minutes, you were doing something else entirely.
Sessions aren’t fundamental facts about the user experience, they’re stories we build around the data to understand how customers actually use the product in their day-to-day lives. And since Segment’s API is about collecting raw, factual data, we don’t have an API for collecting sessions. We leave session interpretation to our partners, which lets you design what a session means as you learn from your data and think more deeply about your customers.