xAPI Integrator
Upload an interactive ZIP (must contain index.html
). This static tool will inject the working xAPI libraries and wiring in-browser, then give you a ready-to-upload ZIP. No server required.
Upload
Interactive ZIP:
The resulting ZIP will keep index.html
at the root of the content folder and add lib/xapiwrapper.min.js
+ lib/xAPI.js
. CSP-blocked GA/AdSense will be removed.
Mode
Timeline (adds generic action logging + fallback “Save to SLS” button)
Minimal (only injects xAPI libs and a basic save helper)
Timeline mode attempts to track button clicks, select changes, canvas drags, and auto-save on Pause if typical IDs exist (e.g., playBtn
, pauseBtn
, resetBtn
, shapeSelector
, #simulationCanvas
).
It also adds a floating “Save to SLS” button as a universal fallback.
How it works (expand)
Unzips your upload entirely in the browser (JSZip)
Finds the folder containing index.html
(root, single subfolder, or shallow search)
Removes CSP-blocked GA/AdSense scripts
Injects
and
into your content’s head if missing
(This page itself loads vendor files from ./vendor/*.js
)
Optionally injects a small instrumentation snippet (Timeline mode)
Adds vendored xAPI libs into lib/
in the ZIP
Re-zips and offers a download
Note: To load vendor libraries, this page should be served over HTTP(S). Opening via file:// may block fetch of local vendor files.
Requirements from SLS:
Launch URL must include: endpoint
, auth
, agent
(or actor
), stateId
, activityId
auth is Base64 of key:secret
; the library prepends “Basic ” automatically
agent/actor must be URL-encoded JSON (e.g., encodeURIComponent(JSON.stringify({ mbox: "mailto:student@example.com" }))
)
If these parameters are not present at launch, xAPI calls will be skipped by the integrated app.