Forum Discussion

JimDeRosa's avatar
JimDeRosa
Community Member
3 years ago

New xAPI features question

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!

  • 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

  • Hi, Jim.

    Thank you for reaching out!

    When you are using the LRS without a Learning Management System, you will need to supply the actor via a query string. Take a look at the article below for additional information:

    I hope this helps!

  • JimDeRosa's avatar
    JimDeRosa
    Community Member

    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?

  • Hi, Jim!

    The query string won't be created from within Storyline. Instead, you should contact your IT department or LRS admin for help creating the scripts that will collect the information from the user, since this will look different depending on the LRS you use. 

    • BenMcKenna-ba88's avatar
      BenMcKenna-ba88
      Community Member

      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

    • JimDeRosa's avatar
      JimDeRosa
      Community Member

      Did you happen to see Ben's response that explains my issue further?

  • JimDeRosa's avatar
    JimDeRosa
    Community Member

    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...

  • 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!

  • Hello Maria,

    I wrote a post on a similar topic.

    In my opinion, at the moment, the implementation of LRS support in the Articulate Storyline is meaningless, it needs to be improved.