Limit the number of times a participant can take part

URL of experiment: corsi_neu [PsychoPy]

Description of the problem:
Hi there!
I’m running my experiment on pavlovia now and I found that I had some subjects who would click on the link multiple times to do the task, so their data would be recorded many times. And I only need each participant to do it once.
I was wondering if I can set my experiment so that participants who have already participated will not be able to access it again?
Thank you very much!

Hi There,

This is not possible out of box just yet I am afraid. There are 2 ways you could do this in theory:

  1. Your recruitment service might allow a way of approaching this e.g. prolific allows a list of participants that are not permitted to take part via a custom screener (e.g. because they have done so already).
  2. If you have a list of participant IDs that have taken part you can add some custom code to make sure that participant doesn’t take part again

e.g.

participants_not_allowed = [1, 123, 432]
studyReps = 0
if int(expInfo['participant']) in participants_not_allowed:
    studyReps = 0
# then wrap a loop around all routines in the study and set the nReps field to studyReps

Unfortunately however this does require some manual intervention, so it wouldn’t prevent an immediate double click.

Becca

Thank you! Yes, I do have the participant IDs, but that’s really a lot, more than a hundred. Looks like I’ll need to enter them one by one.

if you have a list of IDs I would suggest making a script to extract them and write the string. For example, typically participant IDs are the first value in the csv file followed by an underscore. If you run the below inside PsychoPy coder it would allow you to select your existing data files and then print out a string in your output window to be copied into your code.

from psychopy import gui

# open a gui to select data files
filenames = gui.fileOpenDlg(allowed="*.csv")

participant_IDs = []

for filename in filenames:
    thisID = filename.split("_")[0]
    participant_IDs.append(thisID)

print("Please copy this list into your code")
print(participant_IDs)

Hope this helps,
Becca

Thanks a lot! It’s helpful. But I also need an instant way to block double clicks, which doesn’t seem to be feasible …

Hi There,

Yes - unfortunately not doable at the moment. This is something currently handled by the recruitment platform side (i.e. prolific, sona etc).

Becca

Thank you for your detailed answer! It’s very enlightening!
Yao

Hi Becca,
I was wondering if it would be possible to limit participant IDs to one click on the link, limiting their clicks before they participate in the experiment, rather than after they click?
If this works, then I don’t have to change the code after they have participated.
Yao

How are you distributing the link?

You might find the VESPR Study Portal useful if you want participant IDs to be generated automatically but limit the chances of accidental double-clicking.

Alternatively, Qualtrics can be set up to send single use links to a contact list.

We distribute the links in a learning system (part of the experiment), before which we have generated the IDs of the participants.
The subjects were asked to do lots of tasks, we needed to keep them using the same ID for different tasks.
So it would be good if I could set the students to click only once in psychopy.

If the link can contain the personal id (like a mail merge) then you can send it as ?id= in a portal link.

However, if you are talking about participants doing multiple experiments one after another in the same session, then perhaps you actually want to use daisy chaining so each experiment sends them to the next one, passing the id value with it.

1 Like