Comment on page
config-exbuilder.json
The
config-exbuilder.json
file is a configuration file for exbuilder's landing page, which is designed to help you generate URL variables and pass them to your experiment. Since these values are used to write to the database, using a form like this can ensure that you (or your research assistants) enter the correct values without having to have complex constrains in the database itself."project": {
"name": "Your Project Name",
"description": "brief description of your project for your records."
}
parameter | default | description |
name | Your Project Name | Name of your project, appears in first box on URL generator form. |
description | brief description of your project for your records | Brief description, for your records. |
"landing_page": {
"title": "exbuilder",
"description": "Welcome to exbuilder's webserver. Customize your landing page with config-exbuilder.json",
"placeholder_text": "Select an experiment to run"
}
parameter | default | description |
title | exbuilder | Used to generate the title of your landing page. |
description | Welcome to exbuilder's webserver. Customize your landing page with config-exbuilder.json | Used to generate the description of your landing page. |
placeholder_text | Select an experiment to run | Used to label the experiment selection box on your landing page. |
"randomid": {
"length": 12
}
parameter | default | description |
length | 12 | Used to create a random id for each participant of this length |
"url_params":[
{
"name": "researcher",
"placeholder_text": "Select a researcher",
"kind": "select",
"options": ["dorothy", "tin man", "scarecrow", "lion"]
},
{
"name": "location",
"placeholder_text": "Select a location",
"kind": "select",
"options": ["oz", "kansas"]
},
{
"name": "sourcedb",
"placeholder_text": "Select a source database",
"kind": "select",
"options": ["prolific", "mturk", "sona", "salesforce"]
},
{
"name": "participant",
"placeholder_text": "Participant ID from source database",
"kind": "input"
}
]
The
url_params
parameter is an array of objects. It can take an array of URL variables (as objects) to include in the form generated when you select an experiment. These URL variables should match the ones your database expects to receive. Each url variable should include the following parameters.parameter | example | description |
name | researcher | Should be the name of the variable in your database. |
placeholder_text | Select a researcher | Used to generate the placeholder text on the URL generator form. |
kind | select | Can be "select" or "input", used to specify what type of form element to create. |
options | ['dorthy', 'tinman', 'scarecrow', 'lion'] | If kind is select, used to generate the options for the selector on the URL generator form. |
"experiments":
{
"experiment1": {
"name": "experiment 1 jspsych example",
"path": "experiment1-jspsych/experiment.html",
"conditions": {
"condition1": {
"description": "this condition is this",
"n": 20
},
"condition2": {
"description": "this condition is that",
"n": 20
}
}
},
"experiment2": {
"name": "experiment 2 jspsych recordaudio example",
"path": "experiment2-jspsych-recordaudio/experiment.html",
"conditions": {
"condition1": {
"description": "this condition is this",
"n": 20
},
"condition2": {
"description": "this condition is that",
"n": 20
}
}
}
}
The
experiments
parameter is an object in which each property is an experiment. The property name (e.g. "experiment1") is the one written to the database.parameter | example | description |
name | experiment 1 jspsych example | Name of the experiment for your records. |
path | experiment1-jspsych/experiment.html | Path to the experiment, which the landing page sends you to when you click the Submit button. |
conditions | { "condition1": {}, "condition2": {}} | Conditions is an object whose properties are the conditions of the experiment. The property name (e.g. condition1) is what gets written to the database. Each condition property is itself an object, which takes any arbitrary properties. To illustrate, we've included description and n . But these could be anything you wish to note about the condition for your records. |
Note that we do things this way because we don't want a descriptive condition name in the URL to be revealed to the participant.
Last modified 2yr ago