Example Experiment Demo Experiment Run Experiment

Example Experiment

Jaap Murre

Example experiment showing how to invite subjects with an extra 'token' argument to communicate to the script in which condition to place the subject.

Call this experiment as https://scripting.neurotask.com/exp/nW2M5kF4Q7/34, where 34 is the subject ID, which should start at 0 (0%4==0), so for con we will have 1,2,3,4,1,2,3,4, etc. The number 34 (subject ID) can be accessed inside the script with the variable nt_token.

If you are a registered user and signed in, you can here copy this script and its stimuli to your own account, where you can edit it and change it in any way you want.

It is absolutely free to register (no credit card info asked!). You can then instantly copy this experiment with one click and edit it, change its accompanying texts, its landing page, stimuli, etc. Invite your colleagues, friends, or students to check out your experiment. There is no limit on how many people can do your experiment, even with a free account.

The catch? There is no catch! Just keep in mind that with a free account, you cannot collect data. For teaching that is usually not a problem. For research, prepaid data collection (unlimited subjects) starts as low as €10.00 for a 10-day period.

// Call this experiment as https://scripting.neurotask.com/exp/nW2M5kF4Q7/34
// where 34 is the subject ID, which should start at 0 (0%4==0), so for con
// we will have 1,2,3,4,1,2,3,4, etc.

var con = (nt_token % 4) + 1; // con is now 1, 2, 3, or 4

// See https://www.w3schools.com/js/js_switch.asp for switch statement
switch (con) {
    case 1: // use wordlist 1 and criterion 1 
            break; // Every 'case' needs a break
    case 2: // use wordlist 2 and criterion 1 
            break; // Every 'case' needs a break
    case 3: // use wordlist 1 and criterion 2 
            break; // Every 'case' needs a break
    case 4: // use wordlist 2 and criterion 2 
            break; // Every 'case' needs a break
}

input("What is your age?","age");


// Even though input already stores the data, we do it again with logtrial()
// Then, it will have the con and nt_token also associated with it
// You can also add list and criterion as extra arguments
// This is explained in the data dashboard: 
// https://scripting.neurotask.com/user/datadashboard/211015
// and PDF downloadable from there
logtrial(response.age,"age",con,nt_token);

You can download the files as follows: Click on the file (link) and then right-click and choose Save as... from the menu. Some media files (e.g., sound) will have a download button for this purpose.

This experiment has no files of this type
This experiment has no files of this type
This experiment has no files of this type
This experiment has no YouTube links
This experiment has no files of this type