Mouseout trigger needed for xAPI

Jul 05, 2023

I need to get xAPI statements which contain data on how long a user has interacted with a particular element within a slide.

I have an instructions slide which describes elements on an application page.  So there are hot-spots or in my case, rectangles which, when hovered over, change the state of text box.  This then acts like a tooltip on a website. (See attached for a screenshot of what this looks like).

I want to record if a user has accessed this tooltip but also how long for because just getting data on when a user hovers over an element does not provide useful information (as they may do so accidentally for a small fraction of time for example).

The obstacles I'm facing are:

1. The built-in elapsed time variables are limited to project, scene and slide level.   

2. There is no mouse-out (or similar) trigger which would enable me to use a Javascript interval counter to trigger on mouseover and trigger on mouseout to record a length of time the user may have been reading a particular element.

I would be grateful for help on creating a robust solution for this.  I really believe that the value for xAPI for our organisation is in getting a detailed picture of how users are interacting with content so we can improve our materials based on this and make predictions based on user behaviour.

Many thanks

12 Replies
Andrew Rowley

Hi Math - I looked over your excellent code and with a little help from my friend (ChatGPT) I was able to make a proof of concept model of this working: MouseOver-xAPI-03 | Review 360 (articulate.com).  This project also exports a statement containing the total time to an LRS when the user moves to the second slide.  

I could potentially get this doing more but am super excited to have gotten this far so thank you once again for your help! :)

Steve Gannon

Correct.

Also, you may have noticed a shape positioned off the left side of the slide on the layer. There is a motion path assigned to this shape that moves it for a duration of 1 second, over and over again, each time incrementing a counter (so be sure not to delete that shape!). 

When the mouse moves off of the shape on the base layer, the layer gets hidden so the motion of the object on the layer, and thus the counter, stop.

Andrew Rowley

Yeah, I saw that and wondered what it was doing there.  Thank you for your explanation as I was a little puzzled :D 

So did you have a similar requirement in terms of measuring how long a user was hovering over a shape?  It feels like there should be an inbuilt way of doing this.  Perhaps one for the Articulate team in the future.

Andrew Rowley

My idea is that elements (text information etc) within a course are revealed by hovering or clicking.  I could then measure the time people spend looking at these elements and hopefully get more information than (for example) just how long someone spent on on particular slide (as they may just have been off having a cup of tea). 

But the immediate motivator is to see if people actually look at the information in slides pertaining to instructions for a given course.  And then I could potentially link that to how people subsequently interact with the remainder of the material. 

To do that I need quite granular information.  Anyways, it's all in its early stages.  And thanks once again for your help.