Custom Variables

Custom variables are used to store information in the surveys web link. This additional information is then displayed within the survey, as well as on any reports generated from the survey.

Custom variables can only be used by editing a live survey link. This cannot be done within the SmartSurvey system, because the default link is protected. The link has to be edited in an external text editor.

Customised links can then be sent manually to respondents.

Creating a Custom Variable

To create a variable:

  1. Go to My Surveys and select Design next to your survey
  2. In the Survey Design banner menu, hover over Options and select Custom Variables from the drop down menu
  3. Click Add Custom Variable
  4. Type a Variable Name in the box. This is the text you want to appear in your survey link, naming the variable
  5. Type a Label. This is how the variable name will appear in your results
  6. Click Save Variable
  7. If you want to add more custom variables, repeat this process.

Certain names for variables are reserved and cannot be used as custom variable names. For security reasons, we would prefer not to publish these. If you choose one when creating a custom variable, you will see an error message prompting you to choose a different name.

Using a Custom Variable

To make a custom variable live, you have to edit the survey link, including the Variable Name (see above) and a value for the variable:

  1. Go to My Surveys and click Collect next to your survey.
  2. Hover over Default Web Link and click the Settings icon next to Preview.
  3. Make sure your survey is Open, and use Toggle Live Link to show the live link in the box.
  4. Highlight the live link, then copy and paste into a text editor to modify.
  5. At the end of your Link Text, add a question mark (?) If there is already a question mark in the URL, add an ampersand (&) .
  6. Now type your Variable Name. This should be the same as the variable name you gave when Creating a Custom Variable (above).
  7. Next, add an equals (=) sign, then type the value of your variable, followed by a forward slash. For example, if your Variable Name was ‘date’, type the date you want to include as the variable. Make sure there are no spaces. 

If you want to add another variable, add an & sign after the last variable and repeat steps 4-6. You have a maximum of 100 characters.

The final result should look like this example, colour coded so you can see the Domain, Survey Name, Variables, and Values.

https://www.smartsurvey.co.uk/s/Surveyname/?Firstname=Bob&Location=Birmingham

 

Was this guide helpful?