Sub topic 13
Segmenting Activation and Retention
This chapter assumes you can already compute an activation rate and a cohort retention table, as covered in the earlier chapters. It also assumes basic SQL (SELECT, JOIN, GROUP BY). Here you will split those metrics into segments to find which users activate and retain better, and to avoid the mistakes that make segment comparisons misleading.
Why an average hides the story
A single activation rate or retention curve averages over very different users. If 35% of January signups activate, that could mean every kind of user activates at about 35%. It could also mean one group activates at 70% and another at 5%. The average gives you no way to tell which.
A segment is a group of users defined by a shared attribute or behavior. Segmenting means computing the same metric, with the same population rule, event, and time window, once per segment. The goal is to answer three questions:
- Which users reach value, and which do not?
- Where should the team look for the cause of a change in the overall metric?
- Which acquisition sources or product paths bring users who stay?
Choosing what to segment by
Segments fall into two families, and they behave very differently.
| Family | Examples | When it is known | Main risk |
|---|---|---|---|
| Attribute segments | Acquisition channel, plan, platform, country, company size, signup month | At or before signup | Segments that are too small to read |
| Behavioral segments | Invited a teammate in week 1, used feature X, completed onboarding | After signup | Circular reasoning and survivorship bias |
Attribute segments are safe to use as a starting point, because every user belongs to exactly one segment from day zero. Behavioral segments are useful for finding candidate aha moments, but you must handle them with care (see the pitfalls below).
The working model: same definition, one extra column
The rule is simple. A segmented metric keeps the full definition of the unsegmented one. You add the segment as a grouping column and take it from the user's own record, so it does not change over the window.
Segmented activation in SQL
This query extends the 7-day activation rate from earlier. It assumes users(user_id, signup_at, channel) and events(user_id, event_name, event_time). The population is January 2026 signups, the event is project_created, and the window is 7 days from each user's own signup.
-- 7-day activation rate by acquisition channel, January 2026 signups
SELECT
u.channel,
COUNT(DISTINCT u.user_id) AS signups,
COUNT(DISTINCT a.user_id) AS activated,
COUNT(DISTINCT a.user_id) * 1.0 / COUNT(DISTINCT u.user_id) AS activation_rate_7d
FROM users u
LEFT JOIN events a
ON a.user_id = u.user_id
AND a.event_name = 'project_created'
AND a.event_time >= u.signup_at
AND a.event_time < u.signup_at + INTERVAL '7 days'
WHERE u.signup_at >= DATE '2026-01-01'
AND u.signup_at < DATE '2026-02-01'
GROUP BY u.channel
ORDER BY signups DESC;Always output the segment size next to the rate. A rate of 80% on 5 users is noise, and a reader cannot see that unless the count is on the page.
Segmented retention in SQL
For retention, pick one retention point and compare segments at that point. This query measures week 4 retention, meaning at least one core_action between day 28 and day 35 after signup.
-- Week-4 retention by channel for January 2026 signups
-- Run on or after 2026-03-08, so every user has had a full week-4 window.
SELECT
u.channel,
COUNT(DISTINCT u.user_id) AS cohort_size,
COUNT(DISTINCT e.user_id) AS retained_week4,
COUNT(DISTINCT e.user_id) * 1.0 / COUNT(DISTINCT u.user_id) AS week4_retention
FROM users u
LEFT JOIN events e
ON e.user_id = u.user_id
AND e.event_name = 'core_action'
AND e.event_time >= u.signup_at + INTERVAL '28 days'
AND e.event_time < u.signup_at + INTERVAL '35 days'
WHERE u.signup_at >= DATE '2026-01-01'
AND u.signup_at < DATE '2026-02-01'
GROUP BY u.channel
ORDER BY cohort_size DESC;The comment about the run date matters. If any user has not yet reached day 35, they are counted in the denominator but cannot be in the numerator, and the rate is biased low. Segments with younger users look worse for no real reason.
Reading the results
Compare segments on three things, in this order:
- Size. How many users are in each segment? Ignore differences between segments with only a few dozen users, because random variation alone can produce large gaps.
- Gap. How far apart are the rates? A 2-point gap on large segments may be real but unimportant. A 20-point gap deserves investigation.
- Weight. How much of the total does the segment contribute? A great segment that is 1% of signups will not move the overall number.
Then ask why. A segment gap tells you where to look, not what to do. If referral users retain better, the cause might be intent (friends recommend the product to people who need it), or it might be that referred users arrive with a teammate already in the product.
Common errors
Mix shift and Simpson's paradox
The overall rate depends on both each segment's rate and each segment's share of users. When the mix changes, the overall rate can move in the opposite direction from every segment.
| Month | Mobile signups | Mobile activation | Desktop signups | Desktop activation | Overall |
|---|---|---|---|---|---|
| Month 1 | 800 | 30% (240) | 200 | 60% (120) | 36% (360 of 1000) |
| Month 2 | 200 | 28% (56) | 800 | 58% (464) | 52% (520 of 1000) |
Both segments got worse, yet the overall rate rose from 36% to 52% because more signups came from desktop. When an overall metric moves, always check whether the segment mix moved first.
Segmenting by something that happens after the window starts
Suppose you compare "users who invited a teammate" with "users who did not" and find the first group retains twice as well. Users who stay longer have more time to invite someone, so this is survivorship bias. A user who churned on day 2 never had the chance to invite anyone. To reduce the problem, define the behavior inside a fixed early window, for example "invited a teammate within the first 3 days". Then measure retention only after that window closes.
Changing a user's segment over time
If a user upgrades from free to paid, which segment do they belong to? Pick one rule, usually the value at signup or at the cohort start, and apply it to every period. If you use the user's current plan, paid segments will look better because users who churned from the free tier stay in the free segment and users who stuck around are the ones who upgraded.
Slicing until something looks interesting
If you cut the data by ten attributes with five values each, you will find a striking gap by chance. Decide a few segments from a hypothesis before looking, and treat any pattern found by wide searching as a lead to confirm on a later cohort.
A checklist before sharing a segmented metric
- The population, event, and time window are the same for every segment.
- Each user belongs to exactly one segment, fixed at a known point in time.
- Segment sizes are shown next to the rates.
- Every user in the comparison has had the full measurement window.
- You checked whether a mix shift explains any change in the overall number.
Exercise
January signups split into two channels. Paid has 1,000 users with 20% week 4 retention. Organic has 100 users with 40% retention. Your manager says organic is "twice as good" and wants budget moved from paid. Name two things you would check before agreeing.
Show answer
First, check segment size and uncertainty. Organic has only 100 users, so 40% (40 users) could easily come from chance, and the true rate may be much closer to paid. Second, check that the comparison is fair: both segments need the same population rule, event, and window, every user needs a full week-4 window, and the channel must be fixed at signup. You should also ask whether organic can scale, since its users may be a small group of highly motivated people that more spending would not reproduce.
Exercise
A dashboard shows that users who enabled notifications in their first 30 days retain 3 times better at day 60 than users who did not. Why is this comparison unreliable, and how would you make it fairer?
Show answer
Users who stay for 30 days have far more opportunity to enable notifications, so the segment is partly defined by survival (survivorship bias), and motivated users are more likely to enable them anyway. To make it fairer, define the behavior in a short fixed early window, such as notifications enabled within the first 3 days, and measure retention only for users who were still present at the end of that window. For a causal answer, run an experiment that prompts a random half of new users to enable notifications.