Tracker Setup
In order to create the experiment, it is necessary to replace the experiment setup file. The initial setup of the tracker can be found in /lib/js/experiment-json.js. All formating is based on java script object notation (JSON). In order to simplify constructing the experiment, a JSON Generator can be used.
1. Structure:
The experiment setting must be structured exactly in the same format.
var jsonfile = { Insert general variables here (end with comma) "blocks": [ { Insert experiment elements here } ] };
Default settings will create the experiment line after line in this particular order. However, as most experiments require randomization, the sequence of pages can be randomized with a command. For randomization of page sequences, you can use the option random:true. This will apply for all subsequent pages until the option random:false is found.
(click on the image for full size)
A sequence of fixed and random elements is possible; furthermore you can add fixed sequences within a random sorted item.
2. General Variables
If you need to include a project description, you can add general variables here. These values will be assigned to all tracking experiments.
„mandatory“: {
„TrialID“: ‚001‘,
},
3. Experiment Elements
The tracker distinguishes between general elements and tracking experiments. The output file is in comma-separated value format, where the first line consists of the variable names, having a new line for every tracking task. All general variables (e.g., general text input that is not linked to a tracker, Likert-type scales) are being assigned to every tracking experiment in the sequence.
3.1 Pages
Each individual page on the tracking page has to be defined individually. This means that independent of its content, it has to be defined as individual page. The easiest example is a blank page with the button for the next slide.
Please be aware that every page consists of the items list; in order to create two empty pages, you have to create another ‚“items“:‘ before the last bracket. Keep in mind that a comma separates between individual variables. This means that you have to use a comma in between all „items“, but not at the end. This is the case for lines 9 and 16, but not for lines 28 and 30. The same applies for lines 6,7 and (no comma at) 8, 11ff., 20ff., 25ff.
3.2 Individual Pages
Each general page (collected variables are assigned to all tracking experiments; e.g. demographics, mail address) can consist of multiple Items. All changeable factors are written in italic.
Text
{
„type“: „infotext“,
„id“: „infotext20„,
„text“: „Dies ist ein Infotext„
},
id and text can be adjusted; „type“: „infotext“, indicates the purpose. HTML formatting is allowed.
Image
{
„type“: „pic“,
„id“: „pic1„,
„url“: „https://icatcare.org/app/uploads/2018/07/Finding-homes-for-your-kittens-1.png„
},
Input field
{
„type“: „textinput“,
„id“: „input1„,
„text“: „Welche Kekse möchten Sie?„
},
Likert Scales
{
„type“: „likert“,
„id“: „likert1„,
„question“: „Sind Sie ein Keksaholic?„,
„caption_left“: „gar nicht„,
„caption_right“: „absolut„,
„number_selectors“: „7„
},
Consideration page
„items“: [
{
„type“: „consideration“,
„id“: „consideration“,
„title“: „Ihr Einkaufswagen ist leider zu voll. Welches Produkt möchten Sie NICHT kaufen?„,
„subtitle“: „Du darfst nur 1 Item einkaufen„
},
Download Page (final page)
This tracker creates temporary variables, which are not automatically saved in a Database. In order to activate a text-download of the tracking data, please add this final page:
{
„items“: [
{
„type“: „submit“,
„id“: „submit“,
„text“: „Vielen Dank!„,
„btn_value“: „submit“
}
]
}
3.3 Tracking Experiments
Each tracking experiment can either display images OR text. In this instance, the option „random“ shuffles both item positions. Otherwise, the first item in the list is displayed on the left, while the 2nd item is on the right.
{
„type“: „tracker“,
„type_tracker“: „image“,
„id“: „tracker1„,
„title“: „Bitte auswählen…„,
„desc“: „Bildertracker„,
„random“: true,
„items“: [
{
„name“: „oreos„,
„content“: „https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Oreo-Two-Cookies.jpg/1600px-Oreo-Two-Cookies.jpg„,
},
{
„name“: „pringles„,
„content“: „https://images-na.ssl-images-amazon.com/images/I/81wtrEybdhL._SL1500_.jpg„
}
]
},
A text based tracking experiment can be found in the source code. If you want to use individual data for this tracker, you can add the questions after }, (but within this „items“ instance). Here you can use textinput and likert type fields.
4. Example
(click on the image for full size)
5. Potential errors
Please do not use any commas, semicolons or brackets in the experiment description. This will break the structure or at least change your variables. All input fields have been adapted to replace selected special characters.
Furthermore, it is necessary that every ID is defined and unique. You must define every tracker as
„id“: „tracker1„,
„id“: „tracker2„,
„id“: „tracker3„,
while subitems (Likert scales and input fields) are named with the tracker id at first (e.g. tracker1-inputfield).