Set up DataPipe to send experiment data directly to the OSF. This guide covers a typical online experiment using free tools.
Create a project at osf.io to store your experiment data. You will need an OSF account — create one if you do not have one already.
Once you have an account, click Create Project and give it any name you like. Your OSF account can also be used to sign in to DataPipe directly.
DataPipe needs authorization to create files in your OSF projects. If you signed up for DataPipe using your OSF account, this is already done.
Otherwise, go to your Account Settings, switch to one-click authentication if not already enabled, and click Link OSF Account. You will be redirected to OSF to authorize DataPipe, then sent back automatically.
Go to your DataPipe Account Settings and switch to "Personal access token" mode. Then on OSF, go to your account settings, click the Personal Access Tokens tab, and create a new token with the osf.full_write scope.
Copy the token value and paste it into your DataPipe Account Settings. A green checkmark will confirm the token is valid.
Click New Experiment in the navigation bar. You will need to provide:
Title — a name for your experiment.
OSF Project ID — the short code from your OSF project URL. For example, if your project is at osf.io/abcde, the ID is abcde.
Data Component Name — DataPipe will create a new component with this name inside your OSF project to store all data files.
Click Create and you will be taken to the experiment dashboard.
The experiment dashboard has several optional features you can enable:
Condition assignment — request the next sequential condition number. DataPipe cycles through conditions (0, 1, 2, ... back to 0).
Data validation — check that incoming data is valid JSON or CSV. You can also specify required fields. This helps prevent malicious submissions.
Session limit — cap the number of data files that can be sent to your OSF project. You can increase this later.
Psych-DS metadata — automatically produce metadata adhering to Psych-DS, updated after each session.
Only activate the features you need, and only during active data collection. DataPipe creates an open path to your OSF project — validation and session limits reduce the risk of unwanted submissions.
Add code to send data from your experiment to DataPipe. If you use jsPsych, the easiest option is the jsPsychPipe plugin. Otherwise, you can use the DataPipe API directly with fetch requests.
Your experiment dashboard has ready-to-use code snippets for both jsPsych and plain JavaScript. Go to My Experiments, select your experiment, and copy the code from the Code Samples panel.
Host your experiment on any web server — university hosting, GitHub Pages, Netlify, etc. Below is a quick guide for GitHub Pages.
1. Create a GitHub account at github.com and create a new repository. The repo name becomes part of your experiment URL, so avoid names that reveal information to participants. Check the box to add a README file.
2. Go to Settings → Pages in your repository. Set the source to Deploy from a branch and select main. Click Save.
3. Click Add Files → Upload Files and upload your experiment files. Click Commit Changes.
Your experiment will be available at https://[username].github.io/[repo-name]. If your HTML file is not named index.html, append the filename to the URL. It may take a few minutes for the site to become available after uploading.
Back on the experiment dashboard, turn on the features you need:
Enable data collection — for sending text files (JSON, CSV) to OSF.
Enable base64 data collection — for binary data like audio, video, or images.
Enable condition assignment — for automated condition cycling.
Run through your experiment once to verify data files appear in your OSF data component. You should see them immediately after completing the experiment.