When respondents answer an online survey, you can specify the website that they are taken to on completion. You can set up the website address to be specific to a respondent by including one or more survey variables in it.

You can either:

  • insert the response to a question as part of a website address
  • use derived variables (Snap WebHost only) which identify a website address, chosen dependent on a respondent’s answers to the survey
  • pass the content of variables to an active web page, for example, to insert a respondent’s name into a “Thank you” message.

Background

You can pass the content of variables into the website address by using the question name enclosed in curly brackets. The question names are listed in the variable window in Snap. By default they tend to be Q1, Q2 etc, but you can change them.

The data that is inserted in place of the question name depends on the type of question:

Response type Information used
Quantity, Date, Time or Literal response Respondent’s answer
Single-response Code label
Multiple responses The response code labels are joined into a list (so responses of “bee”, “wasp”, “fly” would become “bee, wasp and fly“)

Summary of steps

To give a simple idea of how passing variables in a web address works, this worksheet shows how to create a single-response question about Internet search engines. The code label from the answer is inserted into the website address, giving the complete search engine address.

Step 1: Setting up the question
Step 2: Setting up the final address in the survey properties
Step 3: Publishing and testing the survey

Step 1: Setting up the question

  1. Open the survey that you wish to add your questions to, or create a new survey.
  2. Select the Multi Choice style.
  3. Click [Enter] to create the first part of the question.
  4. Enter the question text.
  5. Click [Tab] to create the different choices and complete the code labels. In the example we are using four search engine names, Yahoo, Google, Ask and MSN. Since it is a single-response question, the code labels will replace the variable in the web address.
    Questionnaire - Design Mode dialog
  6. Select Response in the Toolbar Topic menu, and check the Single radio button.
  7. Click Save button to save your changes.

Step 2: Setting up the final address in the survey properties

  1. In Questionnaire mode, click Questionnaire Properties button to open the Survey Properties dialog.
  2. Select Replies in the lefthand pane.
    19447v2
  3. Type the web address with variables into the Web Page after Submitting box. The variable must be entered as the variable name enclosed in curly brackets.In the example above, the web address is made up of the code label for the question “Which search engine would you like to use now?” and the rest of the web address. Fortunately all the search engines have a similar address structure so you don’t need to set up a derived variable to provide separate addresses.

Step 3: Publishing and testing the survey

  1. Save the changes to your survey.
  2. Publish your survey by selecting File | Publish or [Ctrl][Shift][W].
  3. If you have published your survey to HTML, open it in a browser. If you have published it to Snap WebHost upload it to Snap WebHost.
  4. Go through all the questions, and check that the final weblink is converting correctly in all cases.

If it is not working:

  • Check that you have used curly brackets to surround your variable name.
  • Check that you are not looking at it in the previewer. (Open the published file in a new version of your browser.)

Passing information to a web page

Websites that use scripting, such as Active Server Pages (ASP), can receive variables in the web address. If the website that you are directing respondents to can do this, you can send it information to use. For example. if the website will display a welcome message into which it inserts the viewer’s given name (gn) and family name (fn), and you ask respondents for their given name (stored in q1) and family name (stored in q2), you could pass them like this

http://www.yourwebsite.com/welcome?gn={q1}&fn={q2}.

If you need to pass variables to a website, then talk to your website designer or programmer about what information is needed, and what format it must be in.

If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com