Why would we let respondents delete data
Deleting data is dangerous and definitely not recommended. However, there are times when it may be appropriate or even required. The example that prompted this was a social psychology study that used deception, of which respondents were made aware during the debrief. If the deception prompted respondents to want to remove themselves, this technique handled that automatically.
Technically, respondents are free to leave at any time during the survey. One could include a box described here on _every_ page of the survey, but that seems unnecessary unless in an extreme case. One could include as part of the informed consent too, though personally I'd want to know how many people are opting out based on the informed consent.
Include something in the survey to make the user aware of this option
Insert a multiple choice question in your survey (we'll call it DeleteData). You need a question that the survey logic can check, though you want to word it so that it's as unobtrusive as possible. There are a few ways to do this, and the approach below is just one option. The Next buttons in my screenshots advance the survey.
Create a block named "Debrief" that has the debriefing statement. At the end of the debrief, include text that's something like, "If you wish to remove yourself from the study and delete all your responses, check this box before continuing"
!DebriefText
Build a warning block to avoid accidental deletion
Whatever language you use, create a survey block that includes a warning message to make sure the respondents don't accidentally delete their submissions. I named this block "DeleteWarning."
!DeleteConfirm
Create survey logic
When the respondent clicks Next on the Debrief block, survey logic (1) checks to see if the response in DeleteData is checked. If so, it branches the user to the DeleteWarning block.
When the respondent clicks Next on the DeleteWarning block, survey logic (2) checks to see if the ConfirmDeletion - Yes box is selected. If yes, it brings the user to a customized End of Survey element (blue arrow in the screenshot). If the user clicks to keep his/her data, or doesn't click anything, the survey flows into the normal End Of Survey message.
!Survey flow showing branching
In that End of Survey Customize menu, click "Override Survey Options" and "Do NOT record survey response (not recommended)."
!Custom End of Survey that does not record survey response
Custom End of Survey messages
I would recommend including a custom end of survey message for each of the scenarios. The usual message thanks the respondent for completing the survey. The DeletedData message confirms to the respondent that his/her data were deleted, then asks, "Why do you hate science and want to slow our understanding of human behavior?" (Kidding! I just figured if you've read this far that you could use an attempt at humor.)