Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: quitters not getting marked as quitters, and non-quitters get marked as quitters #548

Open
deargle opened this issue Mar 9, 2022 · 0 comments

Comments

@deargle
Copy link
Collaborator

deargle commented Mar 9, 2022

Logic that has been around for almost a decade has been flagging participants as quitters and then asking them to confirm that they want to quit. If they choose to stay, they're still flagged as quitters. This probably actually doesn't matter though, because if participants get to the end of the experiment after attempting to quit, the /complete route changes their status from "quit" to "complete".

$(window).on("beforeunload", function(){
self.saveData();
$.ajax("quitter", {
type: "POST",
data: {uniqueId: self.taskdata.id}
});
//var optoutmessage = "By leaving this page, you opt out of the experiment.";
//alert(optoutmessage);
return "By leaving or reloading this page, you opt out of the experiment. Are you sure you want to leave the experiment?";
});

Besides that, the current method of returning a string doesn't reliably trigger a confirmation prompt in all browsers. MDN suggests using beacon instead. Edit: meaning that quitters don't always get marked as such, because currently, the POST won't always trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant