Custom variables
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, select “More (...)” on the left menu, and navigate to the variables section associated with curly braces “{ }”.
- Select “New variable” and create a variable name. In this example, we’ll create a variable named “first_name”. Make sure “text” is selected under Variable type and check the box to append the variable to the redirect URL.
- Now add a question to your survey build. We’ll pick a statement question type. Type “Hello” and add a space. To pipe in our first name variable, use the “@” symbol > select 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.