Data loss with closed tab

URL of experiment:
run: https://run.pavlovia.org/djangraw/mmi-survey-task/html/
code: https://gitlab.pavlovia.org/djangraw/mmi-survey-task/tree/master

Description of the problem:
After making it to the final task screen, if a subject closes the tab instead of pressing escape or enter, their data file is not saved. Is there any way to change this? Is there a psychojs command that would let us finalize and write the data file before they see the last screen?

2 Likes

I am interested in this also, I searched for a way to do this myself and wasn’t able to figure out how. One sort of hacky solution would be to redirect them to a URL at the end (a simple web site that, e.g., displayed any codes they need to get credit and debriefing), forcing a save, but you still lose all the data accumulated if they close the tab at any point.

I was going to print the page but encountered with some problem in my canon printer offline windows 10 was appearing everytime so please help me to fix the problem.

I believe that this post didn’t receive nearly as much attention as it should have.

I know that it might be tricky to make this happen, but it would be really useful to have a fail-safe in online experiments that would allow a researcher not to lose participant’s data if he or she accidentally closes the window/tab before the experiment ends naturally (either by pressing Esc or some other key). I am writing this because I just lost a very useful chunk of data purely accidentally.

Now, @jon mentioned in one of his posts that “we have to assume that when a participant quits the browser they do mean to be excluded from the study and we should not be keeping their data.”. However, there are plenty of scenarios when this is not the case. Many experiments are developed in such a way that they end with a farewell message after solving the necessary tasks, giving the participant a feeling that he is done and that he can close the window now. There might be a message that he should press a key or something but this can be easily overlooked, especially after a cognitively demanding experiment. Closing the window, in this case, would probably not mean that the participant does not want his data to be stored.

One example is my experiment, the nature of which simply does not allow me to predict the exact moment when it should be ended. Furthermore, it is quite cognitively demanding. Before the (possible) end of the experiment, there is a long interview, and only after the interview, it is clear whether the experiment is to be continued or not. Consequently, there is a high risk for me to lose the participant’s data since I can simply forget to warn the participant once again, and the participant can simply forget the previous warning.

Data loss is a serious problem, and there should definitely exist a way to restore it in the cases of accidents. For example:

  • If privacy is of main concern, then there could at least be an option to return back to the point from where you left off the experiment before accidentally closing the window/tab. Perhaps a unique hyperlink can be created for such purposes. In this case, a participant could be warned and he could return to the experiment and make sure to end it properly.

  • Or, if this is technically too ambitious, data could nevertheless be stored for a while (e.g. 2 hours) when a participant doesn’t finish the experiment properly, and there should be a possibility of retrieving this data by making some sort of request from the side of the researcher as well as the participant.

These would probably not be viable solutions for experiments that accept anonymous participants, but, for those that make us of participants whose “identities” are known (in one form or another), they probably would.

Hopefully, someone will look into it. I am sure you have thought about it already, but … is there really nothing that can be done?

Well, it really is a balance. Yes, as a scientist you never want to lose participant’s data (most scientists also naturally never want them to quit your study even though we’ve told them in advance that they are free to quit at any time without giving a reason). I guess we could find a way to check, whether they really intended to quit and, if so, did they mean for their data so far to be made available to you. But my guess is that the answer to those questions is usuall that they did mean to quit (it was a long and taxing study and they weren’t getting paid much to do it?) and no they don’t want to give you teh data so far (since they probably aren’t getting paid).

We do need to think about this from both sides. That said, yes, if we find a way that we could check with thes user that they do intend to quit then, sure, let’s implement that.

1 Like