TinCan xAPI call on hyperlinked text?

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

Discussion (6)

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!

The one action can be "Run action group" which may contain any number of actions.

Tim

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.

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(undefined

runGroup_og123();

Replace og123 with the html name of the group.

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

Tim

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.

Thanks, for the info, guys!

Discussions have been disabled for this post