lab.js Integration
Overview
Open Lab integrates seamlessly with lab.js, a powerful tool for building interactive online experiments and surveys. This integration allows researchers to create complex tasks in the lab.js builder, export them as JSON files, and incorporate them into the Open Lab Study Builder. Once integrated, these tasks become part of your study flow, enabling participants to complete them via web browsers. lab.js supports a wide range of experiment types, from simple surveys to advanced cognitive tasks with randomization and branching.
To get started with lab.js, visit the official website at https://lab.js.org/ for tutorials and examples. In Open Lab, lab.js tasks are added as components in the Study Builder, where you can preview them, incorporate them into flows with randomization (e.g., between-subjects designs), and collect data securely. Data from lab.js tasks is stored encrypted and can be visualized in real-time dashboards.
There are two primary ways to bring a lab.js task into the Open Lab platform: (1) using the lab.js builder interface to create and directly export the task, which automatically creates a new task entry in Open Lab, or (2) exporting the task as a JSON file from lab.js and manually uploading it either when building a study or in the "My Tasks" area of Open Lab. Both methods ensure compatibility, but the direct export simplifies the workflow by handling the upload automatically.
Prerequisites
Before integrating lab.js with Open Lab:
- Have a lab.js account or use the free builder at https://lab.js.org/builder.
- Ensure your experiment is complete and tested in lab.js, including any media files or custom scripts.
- In Open Lab, create a study and navigate to the Study Builder, or go to the "My Tasks" section in the dashboard.
- Familiarize yourself with lab.js export options, as Open Lab requires the JSON format for tasks.
Method 1: Direct Export from lab.js Builder
The lab.js builder provides a direct export option to Open Lab, which streamlines the process by creating a new task entry in your Open Lab account without manual file handling. This method is ideal for quick integration and ensures the task is immediately available in your "My Tasks" list.
- Open the lab.js builder and design your task or survey using components like screens, sequences, loops, and interactive elements such as response collection or conditional branching.
- Test the experiment locally in your browser to verify functionality, timing, and data output.
- In the builder's export menu, select the option to export directly to Open Lab. You'll need to authenticate with your Open Lab credentials if not already linked.
- Provide a name and description for the task during export. lab.js will handle the upload, creating a new task in Open Lab's "My Tasks" section.
- Once exported, the task appears in Open Lab, ready to be added to any study flow in the Study Builder.
This direct method saves time by automating the JSON export and upload, ensuring compatibility and reducing errors. After export, you can edit the task details in Open Lab if needed.

Method 2: Manual JSON Upload in Open Lab
If you prefer to handle the export manually or need to upload existing JSON files, you can do so directly in Open Lab. This method gives you flexibility to upload tasks either while building a study or in the dedicated "My Tasks" area for reuse across studies.
- Create and test your experiment in the lab.js builder as described in Method 1.
- Export the study as a JSON file from the lab.js export menu and save it to your computer.
- In Open Lab, navigate to the Study Builder for a specific study or go to the "My Tasks" section in the researcher dashboard.
- When adding a "Lab.js Task" component in the Study Builder, or creating a new task in "My Tasks," select the option to upload the JSON file.
- Provide a name and description for the task, then submit. The task will be processed and added to your library or study flow.
This manual method is useful for importing pre-existing lab.js files or when direct export isn't available. Uploaded tasks can be previewed and edited in Open Lab.

Advanced Features
Open Lab supports advanced lab.js features like randomization in between-subjects designs via branching components. Data from lab.js tasks is automatically collected and can be analyzed in real-time dashboards. For custom setups, ensure your lab.js experiment handles data saving correctly for Open Lab's backend.
Tips: Use lab.js's data exchange configuration for seamless integration. If issues arise, check the lab.js documentation for troubleshooting export and compatibility details.
Next Steps
With lab.js integrated, explore the following sections to build and manage your studies on the Open Lab platform:
Study Setup
- Study Builder: Design study flows, upload lab.js JSON files for tasks and surveys.
- Study Management: Learn how to create, edit, and publish studies.
Data
- Data Analysis: Build visualizations to analyze study data.