Facts vs. Stories: Why Twilio Segment Has No API for Sessions
Jan 30, 2015
By Peter Reinhardt
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.
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.
The State of Personalization 2023
Our annual look at how attitudes, preferences, and experiences with personalization have evolved over the past year.
Get the reportThe State of Personalization 2023
Our annual look at how attitudes, preferences, and experiences with personalization have evolved over the past year.
Get the reportShare article
Recommended articles
How to accelerate time-to-value with a personalized customer onboarding campaign
To help businesses reach time-to-value faster, this blog explores how tools like Twilio Segment can be used to customize onboarding to activate users immediately, optimize engagement with real-time audiences, and utilize NPS for deeper customer insights.
Introducing Segment Community: A central hub to connect, learn, share and innovate
Dive into Segment's vibrant customer community, where you can connect with peers, gain exclusive insights, and elevate your success with expert guidance and resources!
Using ClickHouse to count unique users at scale
By implementing semantic sharding and optimizing filtering and grouping with ClickHouse, we transformed query times from minutes to seconds, ensuring efficient handling of high-volume journeys in production while paving the way for future enhancements.