Single-session
The simplest model: a student starts and completes an activity in one browser session. The client SDK tracks time and reports completion together. The frontend is the source of truth — it observed the entire activity lifecycle. Use single-session when:- Students complete the activity in one sitting (quizzes, short lessons, drills)
- The frontend has all the data it needs to report completion metrics
- You do not need to persist activity state across page reloads
Stateful/Resumable
Many apps support activities that span multiple sessions: Here, state lives in the app’s database: progress, accumulated time, and status. The frontend cannot be the sole source of truth because it was not present for all sessions. Use stateful when:- Activities span multiple days or sessions
- The backend owns progress (server-validated answers, adaptive learning)
- Students need to resume where they left off
The Key Insight
Timeback emits two types of learning events:TimeSpentEvent
“Student engaged for N seconds”Per session: Multiple events per activity run.
ActivityCompletedEvent
“Student finished with these results”Per activity: One event per activity run.
How the models differ
Both models use the same client SDK for time tracking. The difference is in who reports completion and whether state persists across sessions.
Single-session guide
Implementation guide for one-sitting activities.
Stateful guide
Implementation guide for multi-session activities.