The xAPI Analytics data model holds the detailed activity data your e-learning content sends to the LRS: each question they see, the answer they choose, their score and how long they spend. It also includes the matching learning platform details, such as users, courses and modules, so you can see who did what and where.
What is xAPI?
xAPI (Experience API) is a standard way for e-learning content to record what a learner does. Each action is sent as a statement, which always follows the same pattern:
Actor (who) + Verb (did what) + Activity (to what)
For example: Sam Smith + answered + Question 3: Which fire extinguisher is used for electrical fires?
Statements are stored in a Learning Record Store (LRS) and loaded into Analytics. Your content must be published in xAPI format for these statements to exist.
How the model is organised
The model has one central table of statements, with the other tables adding detail to it. The learning platform (LXP) data joined to the statements comes in two kinds: learner details (lxp_users, with their groups and positions) and course content (courses, levels, objects and resources). Most dashboards start from the statements table and add fields from the others.
| Area | Tables | What they tell you |
| Statements | xapi_statements | One row per action a learner took: when it happened, the verb, the activity, and any result such as response, score, success, completion and time spent. |
| Who | xapi_actors, xapi_personas, xapi_persona_identifiers, lxp_users | The learner behind each statement. A persona joins together the different identifiers one person may use (such as an email address and an account name), and lxp_users adds their learning platform profile. |
| Did what | xapi_verbs | The action recorded, such as launched, answered, completed or passed. |
| To what | xapi_activities, xapi_context_activities | The question, page, module or course the statement is about, and the larger course or module it sits within. |
| Questions and answers | xapi_interaction_components, xapi_interaction_components (All), xapi_statement_choices | The answer options for each question, which one is correct, and which option each learner chose. The standard xapi_interaction_components table only holds options learners actually chose. The (All) version holds every possible option, including ones nobody chose. Use it to show a question with all its answers and count how many learners chose each, so unchosen answers show as 0 instead of being missing. |
| Learning platform content | lxp_courses, lxp_levels, lxp_objects, lxp_resources, lxp_award_class | The courses, modules, learning items, resources and badges in your learning platform that each statement links to. |
| People groupings | positions, groups | Learners’ job positions and the groups they belong to, for filtering and comparing. These join through the learner’s profile in lxp_users, not directly to the statements. |
| Extra detail | xapi_extensions | Any additional information your content sends that doesn’t fit the standard fields. |
| Where it came from | xapi_stores, xapi_organisations | The LRS store and organisation each statement came from. |
| How up to date it is | data_model_stats | When the data was last refreshed (last_refresh_date), when the newest statement arrived (latest_updated_at), and the total number of statements (number_of_statements). Add these to a dashboard so viewers can see how current the numbers are. |
Useful fields in the statements table
| Field | What it means |
| timestamp | When the learner did the action |
| response | The learner’s answer, as sent by the content |
| raw_score, min_score, max_score, scaled_score | The learner’s score, the possible range, and the score scaled between -1 and 1 |
| success | Whether the learner passed |
| completion | Whether the learner completed the activity |
| duration_seconds | How long the learner spent, in seconds |
| registration | Groups together the statements from one attempt |
| is_launch, is_object_completion, is_course_completion | Flags that make common counts easy, such as launches or course completions |
Things to know
- Count learners, not rows. A learner can send many statements for one question, for example if they retake an assessment. Count distinct personas or users when you want the number of learners.
- Use attempts to compare retakes. The registration field groups statements from the same attempt, so you can look at first attempts separately from later ones.
- Timestamp vs stored. Timestamp is when the learner did something; stored is when the record arrived. Use timestamp for reporting.
- Not all content sends the same detail. What appears depends on what your content tool sends. Some content sends only launches and completions, with no question data.
Next steps
- xAPI data model: data dictionary
- xAPI data model: how to use it
- Which data model should I use?