Save data periodically during the experiment #3188
-
I posted a few years earlier about incomplete .csv files being saved from online participants, and what solved the issue was adding a few seconds to the end of the experiment (so participants couldn't immediately close the window or redirect, and the data could be fully transferred.) I now have an experiment that records audio from the participants, which makes the resulting .csv file much bigger (6 MB according to my tests instead of under 100 KB). I am worried that larger data files may not be fully transferred to the server. Could the .csv file be uploaded periodically during the study? Alternatively, audio is recorded only in the first half of the experiment, could the first half be uploaded as separate file before the second? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
How are you hosting the experiment and handling data storage? On cognition.run, the data is saved by default after every trial. In our lab we have our own hosting, and what I do to make sure that the data is saved is to have a trial with a continue button at the end of the experiment. The continue button is disabled by default, and the message informs the participant that their data is being sent to the server. The |
Beta Was this translation helpful? Give feedback.
Below is the code that I use. The idea is to disable the button at the start of the trial and to send the data at the same time. When the server returns a success response the button is enabled and the participant can continue.