xAPI: How can I collect and store learner information to use for learning analytics on OpenLearning?

xAPI lets you gather specific information about how learners interact with your courses, and store it in your own LRS (Learning Record Store).

It specifies how learning content, activities, and systems share data and track user interactions, behaviours, state, and context. All this data can then be sent to your own independent database (which xAPI calls the Learning Record Store or LRS). xAPI is the successor to the now obsolete SCORM standard, providing a new approach to address the needs of greater flexibility, security, and interoperability in modern platforms.

Event Triggers

The mechanism by which xAPI sends interaction events (xAPI statements) is via HTTP, acting as a webhook. This allows user actions on OpenLearning to trigger actions in other systems such as CRMs and Analytics tools or any other system which can receive an HTTP Request with a JSON body.

Any course can be configured to send xAPI statements using a resthook by providing the required endpoint and credentials to the OpenLearning Courses API, or via a Zapier integration (for use cases where a fully-fledged LRS is not required). e.g. triggering an event when a user has completed a course.


The general flow is illustrated as follows:


xAPI Statements

Configuring your OpenLearning course with an LRS (or another system which receives xAPI statements) means that interactions made by learners in your courses can be sent to your other systems, to trigger integrations or for storage alongside other learning data. The OpenLearning platform automatically tracks and sends user events as xAPI statements, such as:

  • Visiting a page

  • Commenting/replying on a page

  • Commenting/replying on a post

  • Sharing a post from a widget

  • Completing a widget, page, or course

  • Receiving a certificate

A full list is available here.


In addition to these statements, you can also include your own HTML5 content (upload your own xAPI package) within a course. This content can be configured to track its own interactions and send additional statements to your LRS and OpenLearning (e.g. to track completion). 

OpenLearning's "HTML5/xAPI" widget can be used to include xAPI-enabled content inside an OpenLearning course.  In OpenLearning's authoring tools, it has the following icon:

OpenLearning will send (to your LRS) both the xAPI statements generated for all interactions within an OpenLearning course, as well as any interactions within these included xAPI-supporting tools. (e.g. xAPI-enabled packages built and uploaded by the course creator using the OpenLearning xAPI widget).


A diagram of how xAPI integrations are structured in a typical education technology ecosystem.


OpenLearning cannot create an LRS for you as of yet. If you would like to create one, you can do so using one using one of the following products: 

Once you have an LRS set up, contact us at support@openlearning.com and provide us with:

  • The URL of your course(s)
  • The URL your LRS uses as its xAPI endpoint
  • The Username (Key) and Password (Secret) to access your LRS

Once we have this information, we will set up these courses to start tracking statements to your LRS.

An LRS (or resthook) can also be added to your course using the OpenLearning API using the /courses/{course_id}/xapi-integrations/ endpoint.

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • David Collien I'm trying to set up an integration on Zapier. Which authentication do we need to use? 

  • Ah ok, clicking that link earlier just lead me to a blank Zapier screen so I was a bit confused. Will do some playing... 

Like4 Follow
  • 8 mths agoLast active
  • 3Replies
  • 1001Views
  • 10 Following