Mouse tracking on external html pages #3276
-
Hey everyone, does anybody know if it is possible to implement the mouse tracking extension in external HTML pages. So if a combination of the extension and the plugin is possible? Or do I have to put everything inside the stimulus in, for example button response screens? |
Beta Was this translation helpful? Give feedback.
Answered by
Shaobin-Jiang
Apr 23, 2024
Replies: 1 comment 1 reply
-
If you mean the external-html plugin and the mouse-tracking extension, yes, they can work together. let jsPsych = initJsPsych({extensions: [{type: jsPsychExtensionMouseTracking, params: {minimum_sample_time: 50}}]});
let trial = {
type: jsPsychExternalHtml,
url: './test.html',
cont_btn: 'start',
execute_script: true,
force_refresh: true,
extensions: [{type: jsPsychExtensionMouseTracking, params: {targets: ['#jspsych-content']}}],
on_finish: function (data) {
console.log(data);
}
};
jsPsych.run([trial]); I use the code from the documentation (see here) in my |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
L0i0n0a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you mean the external-html plugin and the mouse-tracking extension, yes, they can work together.
I use the code from the documentation (see here) in my
test.html
.