VR Course Contest


Show us your best virtual reality course and win $50 gift card and a winner badge!
CHECK IT OUT

TinCan xAPI call on hyperlinked text?

joejubee
joejubee Community Member Posts: 319 ♪ Opening Act ♪
Ok, so I'm in the middle of putting together my first xAPI-based course. My first question (of, I'm sure many) is, "How do I send a xAPI statement on hyperlinked text?" I want to track how many people click on a link in my course, but I'm not sure how to do that on hyperlinked text.

Obviously, on a button element, you can add multiple actions (the on-goto action, and the send xAPI statement) but on hyperlinked text, you can only add one action.

Any ideas?

Thanks,

Joe

Comments

  • joejubee
    joejubee Community Member Posts: 319 ♪ Opening Act ♪
    Ok, so I can create an action group that does the hyperlinking and the xAPI calls, but I have to think that there is a better way. In that situation where I had a page with say, 20 links that I wanted to track, I'd have to create 20 groups with all that other nonsense...

    I'm thinking that there should be some global command that says essentially, onClick - Send Statement - Interacted - "ObjectName" or something like that where Lectora used some action/variable thingy to pull the object name into a sendable format.

    Thanks.
  • timk
    timk Community Member Posts: 1,148 ✶ Headliner ✶
    The one action can be "Run action group" which may contain any number of actions.

    Tim
  • joejubee
    joejubee Community Member Posts: 319 ♪ Opening Act ♪
    Thanks Tim - yea, I know you can do that, but there has to be an easier way than adding action groups all over the place, ya know? Some global action... Thanks!
  • timk
    timk Community Member Posts: 1,148 ✶ Headliner ✶
    I don't know too much about xAPI, but I suppose it should be possible to use a Lectora variable, e.g. "Link" for the hyperlink someone clicked and one action group to set the xAPI statement. The hyperlink should "Run javascript" with:
    VarLink.set("Enter something to identify the clicked link");
    runGroup_og123();

    Replace og123 with the html name of the group.

    The xAPI statements object (in the group) would be VAR(Link)

    Tim
  • t_johnb
    t_johnb [email protected] Community Member Posts: 295 ☆ Roadie ☆
    Action groups are the way to go if you need to have more than one action on a hyperlink.

    As Tim mentioned, if you were doing just about the same action each time and just changing one thing, for instance the object of an xAPI statement, you could use the JavaScript to call both, but I would think it would be more maintainable just having an action group for each.
  • joejubee
    joejubee Community Member Posts: 319 ♪ Opening Act ♪
    Thanks, for the info, guys!
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!