An advanced feature used to pass information into a survey.
Variables are an advanced feature. You can use them to pass information into a survey, such as a person's name. You can also use them to dictate display logic.
Let’s say you want to greet someone by their first name in a survey. Take the following steps:
- From the “Build” tab, head to Actions > Manage variables > “Add variable” and create a variable name. In this example we’ll create a variable named “first_name”.
- Now add a question to your survey build. We’ll pick a statement question type. Type “Hello” and add a space. Then, from the icon menu above your focus box, select “Insert text from” (the icon that looks like a parachute) > variable > first_name.
- Hit publish and navigate to the “Collect” tab.
- Create a new collector or just click on the “Testing link” collector.
- Select “Edit” from the drop down.
- Check “Display variables in web link”
- Select the “Copy” button
- Paste your URL into your browser in a new tab and replace “XXX” next to first_name with a name such as “Bryan”.
- Hit enter and you’ll see “Hello Bryan”.
Viola! Now you know how to pipe external data into your survey via variables. You can also use variables to set display logic. E.g. if first_name=Bryan then hide this question. Another example would be if version=A hide or show this question.