Hi, I am looking for a solution using JavaScript/jQuery to record whether a user hovered over or moused over an icon (this icon is in a question response option). I know similar solutions have been found for clicks,
such as : https://stackoverflow.com/questions/38225021/tracking-when-an-external-link-is-clicked-in-qualtrics-with-javascript and https://community.qualtrics.com/XMcommunity/discussion/2809/track-whether-a-link-is-clicked-in-qualtrics-even-a-respondent-leaves-for-the-opened-new-page.
but I am interested in when users access hover over options on my survey for informational text.
My current attempt has been to modify these previous solutions for clicks, but instead passing in mouseover as the event type.
'information' is the id that I define within the question response option for the icon:
"hover" is the Embedded Data value that I set to 0 in the Survey Flow section above my survey.
I have used several versions of similar code fragments but all have failed to yield hover=1 at the end. I attempted creating a baseline click version to make sure it'd work with the current code (all the same, but event type is click, and test html is :
and this runs without fail, setting hover correctly to 1.
I appreciate your help!
Page 1 / 1
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery('#information').mouseover(function(event){
Qualtrics.SurveyEngine.setEmbeddedData("hover","1");
});
});
If working with simple layout, few things need to be done differently. This post should help.
Best
Christian
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.