Replies: 1 comment
-
Hi @aschutz32, I wrote up a test page to verify that the interaction data is being recorded correctly: <!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/plugin-fullscreen"></script>
<script src="https://unpkg.com/@jspsych/plugin-html-button-response"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/jspsych.css">
</head>
<body></body>
<script>
const jsPsych = initJsPsych({
on_interaction_data_update: (data) => {
console.log(data)
}
})
const timeline = [];
timeline.push({
type: jsPsychFullscreen,
fullscreen_mode: true
});
timeline.push({
type: jsPsychHtmlButtonResponse,
stimulus: 'Press the button to continue.',
choices: ['Continue']
});
jsPsych.run(timeline)
</script>
</html> This works for me, and the interaction data shows up in the If your question is about the data that is shown with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I appreciate the help lately with getting my experimental code working. I am now trying to track specifically when participants exit fullscreen via 'on_interaction_data_update' within the initJsPsych call. This seems rather simple to do, however it is not showing within the data regardless if I exit fullscreen or switch tabs. I am using version 7.3.1
Do I have it written incorrectly?
I have looked through other posts and nothing I have tried appears to work. Any suggestions are more than welcome! Thank you!
var jsPsych = initJsPsych({
on_interaction_data_update: function(data) {
console.log(JSON.stringify(data));
},
on_finish: function(){
jsPsych.data.displayData();
}
});
Beta Was this translation helpful? Give feedback.
All reactions