New xAPI features question

Dec 13, 2021

Using the new features, is it possible to specify the actor for a custom xAPI statement? The goal being recording activities in an LRS when no LMS is present. For example, launching HTML5 course from a website, asking for name or email, then recording actions using the captured email address as the actor.

I don't see this capability. The xAPI statement simply lists "learner" did something, which one would assume requires an LMS to populate the learner name.

If I'm just misunderstanding, please enlighten me. Thanks!

11 Replies
Jim DeRosa

Thanks, but this doesn't really explain how one would create this from inside Storyline.

If there is a  published course hosted somewhere and we have no way of knowing who the user is until they launch the course and presumably enter their name or email in the launch page of the course, this doesn't follow as a solution.

Am I misunderstanding something?

Ben McKenna

Hey Maria,

I'm pretty sure the issue Jim is getting at is the fact that without an LMS (or any backend which stores user credentials) there's no way of knowing or passing this information through a query string.

One of the benefits of xAPI is that you don't need a centralized database to store learner information and that xAPI content can be hosted anywhere, so it's bizarre that Storyline would make it a requirement to pass actor information through a query string, which requires you to:

a) have ownership of the platform that it's being delivered on AND

b) have some sort of account system already in place.

I tried sending actor information using variables, but Storyline refuses to acknowledge information is provided through this method. Perhaps there is a reason for this I am unaware of, but I don't see any reason why it shouldn't work...

I submitted this as a feature request (#03013026) in case you wanted to follow it up.

Cheers

Jim DeRosa

Yes, yes, 1000 times yes. Thank you, Ben for explaining more eloquently than I did.

Given the recent changes that rendered Google Analytics events integration non-functional, this is very important. Not just for people without an LMS, but for those who want to track more granular and specific events, you know, the entire reason for xAPI...

Maria Costa-Stienstra

Hi, Jim.

As of right now, as I mentioned, the only way to send the actor's information without a Learning Management System is through a query string using the LRS. 

We received Ben's feature request, and I've shared the details and your comments with my team. I'll update this discussion if it makes it on the roadmap!

Bastiaan Timmer

Hi Jim,

I'm using the following Javascript code to provide an actor on launching a xAPI project/course:

 function getActor() {
     
    const queryString = window.location.search;
    const urlParams = new URLSearchParams(queryString);
    const name = urlParams.get('name')
    const email = urlParams.get('email')
     
 return {
 "mbox" : "mailto:" + email,
 "objectType" : "Agent",
 "name" : name
 };
}

This Javascript code will get the name and the email from the URL. So if your start file is story.html, you can provide the parameters below for running the course for a specific actor:

name=John Doe
email=johndoe@example.com

The link will be:

story.html?name=John Doe&email=johndoe@example.com

Maybe you could use another storyline project for capturing the name and email and building up the launch URL.

Best regards,

Bastiaan