I'm working on a survey where the objective is to record user mouse and gaze patterns.
To do this i'm using some custom js code and
webgazer
.
To start the recording of mouse and webcam data i put some js code in the question.twig file in a custom theme.
This works but obviously starts one time for every question loaded, so if i have two questions on screen my recording script starts twice and i have data duplication.
Is there someplace else where i could put this code? Maybe with the ability to start it only on certain questions? Can i put js code on specific questions without having to put code in template files?
When using curly braces in question source, you need to insert a space or line-break after the opening brace and before the closing brace to prevent Expression Manager from parsing it.