How to Use Survey Variables

Survey variables offer a quick method for pre-populating existing data into a survey. For example, by adding a simple query link to the end of a survey, you can ensure that all relevant data is collected for each response. This feature, therefore, allows you to push data into your survey via the survey link.

Add a custom URL variable

  1. On the Dashboard page, click on the Edit link for your survey.
  2. Click on the Advanced Options link from the header menu. Then click on the Variables link.
  3. Enter a URL variable name.
  4. Enter the default value as needed.
  5. Click on the Save button.

Add Survey Variable

Pass data from URL to question title

  1. Navigate to the question that you wish to pass data in.
  2. Insert a variable surrounding by double "curly" brackets, such as {{city}}, in the question title or text.

Survey Variable in Titles

In your survey URL, you can add a parameter at the end, such as "?city=Paris". This allows the question to replace the variable with the parameter value in the URL.

Pass Data from URL to Titles

If your survey expects to receive data from the URL, but the URL doesn't contain a value for the specified parameter, the variable with double "curly" brackets in your survey element will be replaced with an empty string unless you added a custom URL Variable with a default value. For example, if the default value for the "city" variable in the above example is "Rochester", then the survey will look like the screen below.

Survey Variable Default Value

Pass data from URL to a choice

  1. Navigate to the choice that you wish to pass data in.
  2. Insert a variable surrounding by double "curly" brackets, such as {{city}}, in the choice.

Survey Variable in Choice

In your survey URL, you can add a parameter at the end, such as "?city=Paris". This allows the question to replace the variable with the parameter value in the URL.

Pass Data from URL to Choice

It should be noted that this feature applies to choices in Multiple Choice, Dropdown, Grid - Multiple Choice, and Grid - Dropdown questions.

Pass data from URL as an answer

In your survey URL, you can add a parameter at the end, such as "?Q1=Tom". This allows the survey to pre-enter the answer for a question with the parameter value in the URL. The parameter variable name starts with "Q" (case insensitive) followed by the index number of the question.

Please be noted that:

  1. This feature applies to Multiple Choice (Single-select), Dropdown, NPS, Star Rating, Scale, Slider, Textbox, and Comment Box questions.
  2. If your data contain special characters, please use URL encoded characters in the URL. For example, "?Q1=Tom%20Smith" will put "Tom Smith" as the answer.

Pass Answer from URL

Share the article:

Search for articles: