This article is a working checklist for designing and running a psychology experiment, with notes on where online data collection changes the decisions. It assumes you already have a hypothesis and covers design, recruitment, data quality, ethics and a concrete pipeline with jsPsych and Cognition.
Start by naming your independent variable(s), the levels of each, and the dependent measure (reaction time, accuracy, a rating). Then decide how participants are allocated to levels.
randomize_order: true.pwr package in R, and base the expected effect on prior studies or a pilot, remembering that published effects are usually inflated.
Traditional recruitment means a departmental participant pool, usually run through SONA Systems, where students take part for course credit. Online, the main options are Prolific, a panel built for research with pre-screening and a requirement to pay at least a minimum hourly rate, and Amazon Mechanical Turk, which is larger and cheaper but has a higher share of inattentive and automated responders. All three pass a participant identifier in the URL and expect the participant to be redirected back to a completion page at the end. The details, including how to capture PROLIFIC_PID and issue completion codes without losing data, are in our guide to integrating jsPsych with Prolific, SONA and MTurk.
You are not in the room, so quality control has to be built into the task and the analysis. Decide the rules before collecting data and state them in your preregistration.
jsPsychFullscreen, check that total duration is plausible, look for identical response sequences, and use single-use links so a participant cannot run the task twice.navigator.userAgent and window size so you can exclude phones afterwards.Online studies need the same ethics approval as lab studies. Consent has to be given on screen, with a clear option to decline and to withdraw at any point by closing the tab. Tell participants what is recorded. Under the GDPR, participant IDs from recruitment platforms are personal data, so decide where data are stored and for how long, and avoid collecting anything you do not need. Pay at least the recruitment platform's minimum rate, and provide a debriefing page, especially if any part of the task was not fully explained in advance.
| Laboratory | Online | |
|---|---|---|
| Environmental control | Full: same monitor, keyboard, lighting, experimenter present | None: participant's own device and surroundings; must be checked or accounted for |
| Sample | Mostly local undergraduates; tens of participants per semester | Broader age, education and nationality; hundreds in a day |
| Cost per participant | Experimenter time plus credit or payment; lab space | Platform fee plus participant payment; no experimenter time per session |
| Timing precision | Sub-millisecond with dedicated hardware | Frame-limited display (16.7 ms at 60 Hz) and a few ms of response jitter; fine for within-subject RT effects |
| Data quality control | Observation by experimenter | Attention checks, RT filters, duration checks |
| Best for | Physiological measures, precise psychophysics, apparatus-based tasks | RT and accuracy tasks, memory, judgement, questionnaires, large samples |
jsPsychInstructions trial, a jsPsychFullscreen trial, a practice block, the main block built from timeline_variables, and a debriefing. Tag every trial with data: { task: "main", condition: … } so filtering is easy later.window.CONDITION. Decide when recruitment stops: immediately, on a date, or after N participants.https://<token>.cognition.run URL. Paste it into Prolific or SONA with their ID placeholders; query parameters are added as columns to every trial. For tighter control, generate single-use links in batches of up to 500.on_finish runs, so the completion redirect never outruns the data.A free account includes four tasks with sixty participants each, enough for a pilot or a class project. Create a free account, or see the documentation for the editor, consent and export options.