xAPI

Tracking a PDF with xAPI Using a Template

Do you need to track a PDF? With this template you can easily switch on xAPI tracking to see when a learner starts a PDF and when a learner completes a PDF. Once you download the template, you simply replace the PDF, adjust the HTML and JavaScript files and now you have a PDF sending over xAPI statements to any Learning Record Store (LRS).

IMPORTANT

One thing that I failed to cover in the video is pointing the data to your own LRS. In the js folder open up the xapiwrapper.js file. Line 108 is where you enter in the key for your LRS, line 109 is where you enter in the secret and line 111 is where you place the endpoint. Make sure you update that for your data to come through.

The template is free, so you can adjust the code and modify it how you want. You can even customize it to track specific pages of the PDF. You can download the xAPI PDF Viewer below.

Download Template
Jeff Batt
8 Feb, 2022