Forum Discussion

AndrewRowley-6a's avatar
AndrewRowley-6a
Community Member
2 years ago

Mouseout trigger needed for xAPI

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

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

      • AndrewRowley-6a's avatar
        AndrewRowley-6a
        Community Member

        Hi Steve 

        Thank you for that.  So this is utilising a second layer and also a 'while' trigger - which I could not find and was really looking for! 

        I like this and it could be useful because there are not many in my team who are proficient with JS.

  • Hi Math

    Thank you for that!  I'll spend some time deciphering the code and see if I can get it to apply to my project.

  • SteveGannon's avatar
    SteveGannon
    Community Member

    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.

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

  • SteveGannon's avatar
    SteveGannon
    Community Member

    I have had to track time in a full course or portions of a course for some projects but I never had a requirement to track mouse hovering, at least not using Storyline.

    I agree that developers could benefit from additional built-in time-keeping mechanisms in Storyline.

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

    • SteveGannon's avatar
      SteveGannon
      Community Member

      Sounds interesting, Andrew. Once you deploy your project and gather your data, report back to us here to let us know if the metrics proved useful in refining the course.