When you create a questionnaire for the Web, you can require respondents to log in. The login is always on a page by itself, before the survey proper starts.

Background

You may need respondents to log in so that you can ensure that they only complete a questionnaire once, or to enable Snap WebHost to keep track of their responses. To set up a login page, you must have a known list of respondents and the unique ID that they will use to log in. This must be seeded into the survey using a database link, so that Snap WebHost can compare the respondent login to the stored login.

Snap WebHost allows you to create a separate login page and style it as you would style any other page of your survey. Because Snap WebHost does something special with the login questions, you must use paradata to insert the questions into the survey. You can then edit the question text as you would normally.

To make life simple for respondents, you can also ensure that they are logged in automatically by clicking on a link in an email that has been sent to them. To do this, the survey must have been seeded with the email addresses (from a database link). You can set up emails with the special login link from the Snap Professional PC software or from Snap WebHost. The method is slightly different in each case.

Summary of steps

  1. Open the survey in Snap Professional.
  2. Ensure that your survey has been seeded with logins.
  3. Add the paradata “Respondent” and optional “Password” variables to the front page of your survey.
  4. Edit your login page until it looks the way you want.
  5. Publish the survey.

You can also set up emails with links that automatically log the respondent into the survey.

Step 1: Setting up the database link to include your respondents

To be able to use a login page, you must seed the survey with respondents logins and ids, so that Snap WebHost knows the correct logins (and passwords if used).

  1. Open the survey in Data Entry mode in Snap Professional.
  2. Select File | Database Link to display the Database Linkage dialog box.
  3. Click [New...] to create a new database link. The Database Wizard dialog is displayed.
  4. Click on the Online Survey radio button.
  5. Click [Next>].The Database linkage dialog is displayed.
  6. Click [Select Database File...]and browse to the Excel or MS Access file containing the respondent IDs and data
    OR
    Click [Build Data Link...] to build a link to an SQL Database with the same information.
  7. If you wish to filter the respondents so that this survey is only available to some members of the database, set an appropriate filter in the Where condition box. Click [Next>].
  8. Check the login box and select the login/respondent ID field from the dropdown list. This will be used to set up the Respondents in Snap WebHost. Click [Next>].
  9. Enter a name for the link and click [Finish].

Selecting the database link

  1. In Questionnaire design mode, click to go to the Questionnaire properties page.
  2. Select the Data link section in the left-hand panel. (Note that this is only available for a Snap WebHost edition.)
  3. Select the previously created link to the respondent database in the Database linkdrop-down list.

Step 2: Putting the login question in the survey

  1. Select Paradata in the left-hand panel of the Questionnaire Properties dialog box.
    • To include the respondent identifier paradata variable, click Respondent and check the Use in survey box.

    • To include the password paradata variable, click Password and check the Use in survey box.

    The Respondent and, if requested, the Password variables will have been inserted by the program and appear at the top of the questionnaire.

  2. Click [OK] to retain settings and close the dialog box.
  3. The password and respondent variables will now appear at the top of your survey.

Step 3: Editing the login page to make it look as you wish

By default the password paradata variable is placed above the login variable

  1. Select the password question and press [Ctrl] Down Arrow to move it below the login question.
  2. Edit the text so it is useful. For example:
  3. Click the button to add Instructions to the questionnaire. Type any text you would like, or add an image.
  4. Insert a pagebreak before the first survey question. (The only questions allowed on the login page are the respondent and password paradata questions.)

Step 4: Publishing the questionnaire

Once you have set up the login page within Snap Professional you can publish the questionnaire.

  1. Select File|Publish or [Ctrl] [Shift] W to open the publish dialog.
  2. Publish the questionnaire as normal. If you wish, check the paradata to confirm that you have added them correctly.

Hiding the login screen

If you are sending emails to invite respondents to complete the survey, you can include a link in the email that logs the respondent in automatically. They are taken straight to the first page of the survey and never see the login screen.

Creating the survey email invitation within Snap WebHost with the Survey Auto Link tag

  1. In the “Interviews” section for your survey, click the tab. The email invite messages (if any) are listed on the screen. If there are no messages the list is empty. Note that messages could have been imported as part of the database link when the survey was originally published from Snap Professional.
  2. Click the link.
  3. A new, empty message is created at the bottom of the list. Enter the text of the message in the main text box.
  4. Use the drop down Insert Tag list to include special values.
    You need to insert the “SurveyLinkAuto” tag for the survey URL in the email. This makes Snap WebHost automatically includes a unique ID for the respondent as part of the clickable link to the survey. The respondent will automatically be logged in when they click on the survey URL link in the email invitation or reminder .
  5. Give the message a title and an interval and click [Save].

Creating the survey email invitation within Snap Professional using command-line arguments

  1. When you set up the database link, select Send Email Invites option as well as the Login with optional password option.
  2. Select the Login variable from the dropdown menu and click [Next>]. Note that this must be a field that contains a unique entry for each respondent.
  3. Select the Email address field from the drop down menu.
  4. Set up the link with automatic login:
    • Click [Insert] and select Survey Location from the drop-down menu.
    • Type u= immediately after the [Survey Location] tag in your email.
    • Click [Insert] and select Database Field from the drop-down menu.
    • Select the variable that you used for login from the drop-down menu in the dialog.
  5. Complete the text of your message and click [Next].

You may insert a password into your message by using the string p=[Password variable]. If you need to use both the login and the password, you must insert an “&” after the first variable. E.g.

Other possibilities

The login page for a survey is created as a single html file that contains scripts and text substitution strings that are required by Snap WebHost. You can edit this html file directly, but if you omit or adjust any of required content, the survey may break. Because of this, Snap Surveys will not support you in editing the login pages.