Sub topic 12
Spotting at-risk learners early
What this chapter assumes
You should already be able to read a lesson-level funnel (see "Finding where learners drop off") and know what your platform records, such as enrollments, lesson completions, and last-active timestamps. You also need to be comfortable reading simple SQL and Python. This chapter covers how to turn those records into a list of learners who are likely to leave. It does not cover what to send them. That is the next chapter, "Reminders and nudges that help".
Why early detection matters
Most learners who leave do not announce it. They stop appearing. Once a learner has been gone for three weeks, a reminder is much less likely to bring them back, because the habit is broken and the course content is no longer fresh. An early warning system tries to notice the slowdown while the learner is still within reach.
The funnel tells you where learners tend to leave as a group. Early warning tells you which individuals are showing the pattern now. Both matter, but only the second lets you act on a specific person.
Signals worth tracking
Choose signals that your platform already records and that show a change in behavior. A signal is more useful when it comes before the drop-off, not after.
| Signal | What it suggests | Typical weakness |
|---|---|---|
| Days since last activity | The habit is fading | Learners who binge a course in one weekend look inactive but are fine |
| No first lesson completed after enrollment | The learner never started | Includes people who only enrolled to get access to files |
| Lessons completed versus expected pace | The learner is falling behind a schedule | Needs a defined schedule, which self-paced courses may lack |
| Shrinking session length or frequency | Interest is falling | Needs several weeks of history per learner |
| Repeated failed attempts at one quiz | The learner is stuck | A hard quiz may be a design problem, not a learner problem |
| Opened reminder emails but did not return | The learner is interested but blocked | Email open data is unreliable because of privacy features in mail apps |
| Unanswered question in the forum | The learner asked for help and got none | Only covers learners who ask |
No single signal is reliable alone. Combine two or three, and treat the result as a reason to look, not as a verdict.
Use baselines, not universal thresholds
"Inactive for 7 days" is a reasonable starting point, but the right number depends on the course. A cohort course with weekly live sessions expects a gap of up to a week. A daily micro-lesson course expects a gap of one or two days. Pick the threshold by looking at your own history:
- Take learners from past runs who finished the course.
- Find the longest gap between activities for each of them.
- Choose a threshold near the 90th percentile of those gaps. Most eventual finishers stay under it, and anyone beyond it is unusual.
Revisit the threshold when the course changes. A new lesson structure or a new reminder schedule shifts what normal looks like.
Also compare learners within a segment. A learner who enrolled for a single skill and has done what they came for is not at risk, even if their completion is 40%. The chapter "Not every learner wants to finish" explains why. Where you can, exclude learners who reached their stated goal, or flag them with a different label.
From events to outreach list
The pipeline is small. Raw events become a few per-learner signals, the signals are combined into a flag, and a person or an automated message acts on the flag.
The last arrow matters. If you never record whether flagged learners came back, you cannot tell whether your rule finds the right people.
Step one: a query for inactive learners
The simplest useful query lists learners in one course who have not finished and have been quiet for more than a week.
SELECT learner_id, last_active_at
FROM enrollments
WHERE course_id = 42
AND completed_at IS NULL
AND last_active_at < CURRENT_DATE - INTERVAL '7 days'
ORDER BY last_active_at;This is PostgreSQL syntax. The completed_at IS NULL condition removes learners who have finished. Sorting by last_active_at puts the learners who have been gone longest first, which may or may not be the group you most want to reach. Learners gone for two months are usually harder to recover than those gone for ten days, so many teams add a lower bound as well, for example a window of 7 to 21 days.
Step two: combine signals in code
A single query can miss learners who are active but not progressing. This Python example combines three signals and keeps the reasons, so a human can see why each learner was flagged. It runs as written.
from datetime import date
TODAY = date(2026, 11, 28)
LESSONS_PER_WEEK = 2 # the pace the course design expects
learners = [
{"id": 1, "enrolled": date(2026, 11, 10), "last_active": date(2026, 11, 27), "lessons_done": 4},
{"id": 2, "enrolled": date(2026, 11, 1), "last_active": date(2026, 11, 15), "lessons_done": 2},
{"id": 3, "enrolled": date(2026, 11, 25), "last_active": date(2026, 11, 25), "lessons_done": 0},
]
def risk_signals(learner):
signals = []
days_idle = (TODAY - learner["last_active"]).days
days_enrolled = (TODAY - learner["enrolled"]).days
weeks_enrolled = max(days_enrolled / 7, 1)
expected = LESSONS_PER_WEEK * weeks_enrolled
if days_idle > 7:
signals.append(f"idle {days_idle} days")
if learner["lessons_done"] == 0 and days_enrolled >= 3:
signals.append("no lesson finished yet")
if learner["lessons_done"] < 0.5 * expected:
signals.append("behind pace")
return signals
for learner in learners:
found = risk_signals(learner)
label = "; ".join(found) if found else "no signals"
print(f"Learner {learner['id']}: {label}")The output is:
Learner 1: no signals
Learner 2: idle 13 days; behind pace
Learner 3: no lesson finished yet; behind paceLearner 3 is the most important case. This learner enrolled three days ago and has finished nothing. That is a first-session problem, which the onboarding chapter addresses, and a message within the first week often matters more than any later one.
Common errors
- Using completion as the only label. If you flag everyone who has not completed, you will contact many learners who are progressing normally. Flag a change from the expected pattern.
- Flagging too many learners. If the list is longer than your team can act on, the flag loses meaning. Rank by number of signals and work down the list.
- Treating the model as proof. A signal predicts, and prediction can be wrong. A learner flagged as idle may be on holiday. Word the outreach so that a wrong flag still reads as a friendly message.
- Ignoring learners who are active but stuck. Repeated quiz failures and unanswered forum questions never show up in an idle-days query.
- Never checking the rule. Compare the flagged group with learners who were not flagged. If flagged learners finish at almost the same rate, the rule has no value.
- Collecting more than you need. Keystroke-level tracking is not necessary for these signals. Use the smallest set of data that works, tell learners what you track, and follow the privacy rules that apply to you.
Checking whether the rule works
Take a past course run and apply your rule as if it were week 3. Then see what happened to those learners:
- Among flagged learners, what share did not finish? This is how often a flag is right.
- Among learners who did not finish, what share were flagged by week 3? This is how many of the leavers you would have caught.
- How many learners were flagged per week, compared with the number your team can contact?
A rule that catches half the leavers while flagging a manageable list is usually better than a rule that catches nine in ten but flags half the course. Proof that outreach itself raises completion needs a controlled comparison, which is covered in "Testing whether a change raised completion". A flagged learner who returns after a message may have returned anyway.
Exercise
A self-paced course has 800 learners enrolled in the last month. Your rule flags anyone idle for more than 7 days, and it flags 360 learners. You can personally contact about 40 per week. Name two changes you could make to the rule or process so the list becomes workable, and one risk of each change.
Show answer
One change is to rank flagged learners by the number of signals (for example idle plus behind pace plus no first lesson) and contact only the top 40 each week. The risk is that learners with a single signal, who might have been easy to recover, get no contact. A second change is to add a window, such as idle 7 to 21 days, so you contact learners who are still recoverable. The risk is that learners idle for longer than 21 days are dropped without any attempt. Other valid changes are sending an automated message to the lower-ranked group, or raising the threshold to the 90th percentile of finishers' gaps. The risk of an automated message is that it is less personal and can feel like spam, and the risk of a higher threshold is that it catches learners later.