Stage 1 - Questions & Messages

Stage 1 - Customizing Questions & Messages

How to customize Experience Sampler with your own questions and end-of-questionnaire messages

We will use JSON (JavaScript Object Notation) to store survey questions, end-of-questionnaire messages, and participant setup questions.

Customizing Questions

ExperienceSampler can currently support 9 question formats: descriptive text (i.e., instructions), multiple choice, rating scale, checklist, sliding scale, open-ended text, time picker, date picker, and date and time picker.

    For each question, you will need to specify values for at least 3 of the 6 customization variables:
  • "type": this stores the question format. It can be assigned 1 of 9 values: instructions, mult1, mult2, checklist, slider, text, timePicker, datePicker, and dateAndTimePicker.
  • "variableName": the name of the question that should contain no spaces similar to variable names used in SPSS
  • "questionPrompt": the actual wording of the question to be presented to participants
    The other 3 customization variables are:
  • "minResponse": the lowest numerical value on the rating scale (e.g., 1 on e.g., 1 on a scale ranging from 1 to 7), or 1 for the first option in a multiple-choice question. Values can also range from positive to negative values (e.g., -3 to +3)
  • "maxResponse": the highest numerical value on the rating scale (e.g., 7 on a scale ranging from 1 to 7), or the total number of options (e.g., 10 options, makes the maxResponse value 10). The script will automatically increment values starting from the minResponse value so that each button is one unit higher than the previous until it reaches the maxResponse value
  • "labels": the labels that participants see for each response. There should a label for every value on your scale or option in your multiple-choice question (i.e., if you have seven points on your scale, there should be seven label lines).

Instruction and Descriptive Next

    These questions require values for 3 customization variables:
  • "type": "instructions"
  • "variableName":"variableName"
  • "questionPrompt": "Input your instructions or descriptive text here"

These questions are written in this format:
     var surveyQuestions = [
          /*0*/
          {
           "type":"instructions",
           "variableName": "the name of the question that should contain no spaces similar to variable names used in SPSS",
           "questionPrompt": "Instructions or descriptive text wording",
          },

Below is an example of an instruction screen:
          {
          "type": "instructions",
          "variableName": "generalInstructions",
          "questionPrompt": "On the following screens, we will be asking you questions about your experiences since we last beeped you.",
          },

Rating-Scale Items, Multiple Choice Questions, and Checklist Questions

    These questions require values for all 6 customization variables:
  • "type":"mult1" (for multiple choice questions and ascending rating scale items)
  •           OR "mult2"(for descending rating scale items. That is positive numbers on top and negative numbers on the bottom)
  •           OR"checklist"(for checklist questions)
  • "variableName": "the name of the question that should contain no spaces similar to variable names used in SPSS"
  • "questionPrompt": "the actual wording of the question to be presented to participants"
  • "minResponse": the lowest numerical value on the rating scale (e.g., 1 on e.g., 1 on a scale ranging from 1 to 7), or 1 for the first option in a multiple-choice question. Values can also range from positive to negative values (e.g., -3 to +3)
  • "maxResponse": the highest numerical value on the rating scale (e.g., 7 on a scale ranging from 1 to 7), or the total number of options in a multiple-choice question. The script will automatically increment values starting from the minResponse value so that each button is one unit higher than the previous until it reaches the maxResponse value
  • "labels": the labels that participants see for each response. There should a label for every value on your scale or option in your multiple-choice question (i.e., if you have seven points on your scale, there should be seven label lines).

These questions are written in this format:
          /*1*/
          {
           "type": "mult1",
           "variableName": "variableName",
           "questionPrompt": "Exact question wording",
           "minResponse": minimum numerical value of scale or multiple choice option,
           "maxResponse": maximum numerical value of scale or multiple choice option,
           "labels": [
               {"label": "label for minimum numerical value of scale or first option for multiple-choice questions"},
                …
                {"label": "label for maximum numerical value of scale or last option for multiple-choice questions"}
                ],
          },
          /*2*/
          {
           "type": "mult2",
           variableName: "variableName",
           questionPrompt: "Exact question wording",
           minResponse: minimum numerical value of scale or multiple choice option,
           maxResponse: maximum numerical value of scale or multiple choice option,
           labels: [
               {label: "label for maximum numerical value of scale"},
                …
                {label: "label for minimum numerical value of scale"}
                ],
          },
          /*3*/
          {
           "type": "checklist",
           "variableName": "variableName",
           "questionPrompt": "Exact question wording",
           "minResponse": minimum numerical value of checklist option,
           "maxResponse": maximum numerical value of checklist option,
           "labels": [
               {"label": "label for minimum numerical value of first option for checklist"},
                …
                {"label": "label for maximum numerical value of scale or last option for checklist"}
                ],
          },
Below is an example of a an ascending scale question:
          {
          "type": "mult1",
          "variableName": "closeness",
          "questionPrompt": "How close do you feel to this person?",
          "minResponse": 0,
          "maxResponse": 6,
          "labels": [
               {"label": "0 Not at all close"},
               {"label": "1"},
               {"label": "2"},
               {"label": "3"},
               {"label": "4"},
               {"label": "5"},
               {"label": "6 Very close"}
               ]
          },
Below is an example of a multiple choice question:
          {
          "type": "mult1",
          "variableName": "experienceConflict",
          "questionPrompt": "Did you experience any conflicts since the last time you completed the survey?",
          "minResponse": 0,
          "maxResponse": 1,
          "labels": [
               {"label": "No"},
               {"label": "Yes"}
               ]
          },
Below is an example of a descending rating scale item:
          {
          "type": "mult2",
          "variableName": "mood",
          "questionPrompt": "Please indicate how you feel right now.",
          "minResponse": -3,
          "maxResponse": 3,
          "labels": [
               {"label": "+3 Very positive"},
               {"label": "+2 Somewhat positive"},
               {"label": "+1 A little positive"},
               {"label": "0 Neutral"},
               {"label": "-1 A little negative"},
               {"label": "-2 Somewhat negative"},
               {"label": "-3 Very negative"}
               ]
          },
Below is an example of a checklist item:
          {
          "type": "checklist",
          "variableName": "typeOfSupport",
          "questionPrompt": "Please tell us what kind of support this person provided. Please select as many as applicable.",
          "minResponse": 1,
          "maxResponse": 4,
          "labels": [
               {"label": "Emotional support (e.g., listened to you, cheered you up)"},
               {"label": "Esteem support (e.g., encouraged you, boosted your confidence)"},
               {"label": "Informational support (e.g., gave you advice, offered ideas and suggestions)"},
               {"label": "Tangible support (e.g., helped you with tasks)"},
               ]
          },

Sliding Scale Items

Sliding scale items can only range from 0 to 100

    These questions require values for 5 variables:
  • "type":"slider"
  • "variableName": "the name of the question that should contain no spaces similar to variable names used in SPSS"
  • "questionPrompt": "the actual wording of the question to be presented to participants"
  • "minResponse": 0
  • "maxResponse": 100
  • These questions are written in this format:
              /*4*/
              {
               "type": "slider",
               "variableName": "variableName",
               "questionPrompt": "Exact question wording",
               "minResponse": minimum numerical value of scale or multiple choice option,
               "maxResponse": maximum numerical value of scale or multiple choice option,
              },
    Below is an example of a sliding scale item:
              {
              "type": "slider",
              "variableName": "stressThermometer",
              "questionPrompt": "Please indicate the amount of stress you are experiencing at the moment by moving the slider up or down. 0           means you are experiencing no stress and 100 means you are experiencing the highest amount of stress. You can see the value to the           right of the slider.",
              "minResponse": 0,
              "maxResponse": 100,
              },

Open-Ended Questions

    These questions require values for only 3 variables:
  • variableName: the name of the question that should contain no spaces similar to variable names used in SPSS
  • questionPrompt: the actual wording of the question to be presented to participants

These questions are written in this format:
          {
           "type": "text",
           "variableName": "variableName",
           "questionPrompt": "Exact question wording",
          },
Below is an example of an open-ended question:
          {
           "type": "text",
          "variableName": "otherContact",
          "questionPrompt": "Please specify what contact was involved.",
          },

Date and Time Pickers

    These questions require values for only 3 variables:
  • "type":"timePicker" (for time picker)
  •           OR "dateAndTimePicker"(for the date and time picker)
  •           OR"datePicker"(for the date picker)
  • "variableName": the name of the question that should contain no spaces similar to variable names used in SPSS
  • "questionPrompt": the actual wording of the question to be presented to participants

These questions are written in this format:
          {
           "type": "timePicker",
           "variableName": "variableName",
           "questionPrompt": "Exact question wording",
          },
Below is an example of an open-ended question:
          {
           "type": "timePicker",
          "variableName": "wakeTime",
          "questionPrompt": "Please select the time that you usually wake up.",
          },

Numbering Questions

We advice you to number the survey questions as you input the questions into the surveyQuestions JSON. Numbers should start from 0 because JavaScript uses zero-based character numbering (i.e., the first item in a set is called using 0). This will make customizing subsequent functions like skip logic and question branching in the app easier. We recommend commenting out the survey number using this format:
          /*question number*/ (e.g., /*0*/).
We have provided an example of how to number questions above when we provided the format for rating-scale items and multiple-choice questions.

Customizing Last Page

You can also customize what message participants are presented with once they complete their questionnaire. If you plan on using the snooze function, we recommend you create one message for when participants complete the questionnaire and another for when participants hit the snooze button.
There is only one variable for the last page, message, and is written using this format:

     var lastPage = [
               {
                message: "Last page message"
               },
               …
          ];
Again, when referencing these message later in the app, you should remember that the first message is referred to as 0 not 1 because of zero-based character numbering.

Customizing Participant Setup Questions

We recommend that the first question ask for the participant's ID number to tag the participant's responses. The next questions will be used to schedule the notifications (i.e., determine when participants will be signaled to complete surveys) for each day based on the participant's schedule. The nature of these questions will differ depending on the type of experience sampling design being used.

    If you are using a signal-contingent design, participant setup questions should be used to establish the time period in which participants will receive signals (i.e., the daily data collection period).
    Four questions are needed to establish the daily data collection period:
  •      One question for the start of the data collection period
  •      One question for the end of the data collection period
  • You can use the time picker question format for these questions.
    If you are using an interval-contingent design (such as daily diaries), participant setup questions should be used to determine the specific times when participants need to complete the questionnaire (e.g., when they wake up, right after dinner, or when they go to bed).
    For each specific time points, you will need one question to establish schedule a signal. Again, you can use one of the date and time picker question formats.
    The participant setup questions precede the first question of the survey and are thus referred to using negative numbers with the last question in participant setup being referred to as -1 (e.g., if you have 8 questions in the participant setup, the first participant setup question would be referred to as -8).

Now you're ready to move on to testing your app on a smartphone emulator!

Stage 1 - Questions and Messages

Learn how to customize your survey questions, end-of-questionnaire messages, and participant setup questions.

More

Testing the App

It's important to test your app after each customization stage. Learn how to test your app on a smartphone emulator.

More

Stage 2 - Saving the Data

In this stage, you'll learn how to set up your server and app to save your questionnaire data.

More

Stage 3 - Advanced Survey Features

In this stage, you'll learn how to implement skip logic, question branching, and piped text for your questionnaire.

More

Stage 4 - Snooze Function

Implement a snooze function to remind participants to complete questionnaires at a later time if they are currently busy.

More

Stage 5 - Scheduling Notifications

Schedule your signals for either a signal-contingent design (with random or fixed intervals) or an interval-contingent design.

More