eLB xAPI templates provide a starting point for users to get into using xAPI. So, let's work through how we're making our statements so you can extend or change them as you see fit.
All of the variables we're using for statements have an underscore and xAPI appended.
baseURL_xAPI has a default value that should be edited through the variables pane, since it will remain the same throughout the interaction. The rest change when a trigger fires a statement.
baseURL_xAPI – this should really be the same value you use in the publish identifier. We’re using the web URL where the template is hosted for this value.
contentID_xAPI — this is the specific object (button, etc.) interacted with, in URL format (e.g. “/tab-2”)
verbID_xAPI — this is the URL for the verb you'd like to use.
verbDisplay_xAPI — this is the actual text you'd like the LRS to read out for the verb you’re using. (e.g., “clicked”)
objectName_xAPI — this is how you'd like the content to be shown - in plain-text - in your LRS (e.g. "Tab 2")
objectDescription_xAPI — this is the Description you’d like to use in the LRS. It’s probably a good idea to use something a bit more contextual and descriptive than we have. You can place anything here. To change the values of these, simply click and edit.
The last bit of xAPI in our action here is a final Execute JS. Let’s look at that now.
baseURL_xAPI, cpInfoCurrentSlideLabel (the Captivate system variable for the current page name), and contentID_xAPI get strung together to create a unique Object ID for whatever element is being clicked.
AppleTree_4-Tab contentID_xAPI =
statement object ID:
Then, we format a simple, clean statement using the remaining xAPI variables. When this script fires, you should produce a statement something like the following: