Linking Off-Site surveys with Qualtrics Surveys

Problem:

Having a user start a Qualtrics survey then going to a site and continue other questions and then come back to Qualtrics to complete the survey (see Figure 1).

Figure 1
Figure 1

Solution:

  1. Variables: You need to think of the variables that will need to be moved from one survey to the next.  You need at least one that will hold a unique identifier for each person surveyed.
  2. Start Page: Unless you have all the complete panel of users, you will need a start page where the unique identifier will be created.  This is especially important if you are doing an anonymous survey and don’t have control of who will take the survey.
  3. Qualtrics Surveys: You need to break your Survey 1 into two surveys.  The first survey will end as soon as you go to Survey 2, Survey 2 will then take you to a different qualtrics survey to complete Survey 1.
  4. Off-Site Survey: You need to create a survey that can receive information in the Query String and also send information via Query String to Qualtrics.

Step By Step

Some background, all of this solution is based out of 2 articles in qualtrics (http://www.qualtrics.com/university/researchsuite/append-information-to-the-url and http://www.qualtrics.com/university/researchsuite/advanced-building/survey-flow/embedded-data), make sure you read those articles to understand what I’m showing here.

Start Page

This is needed to create a unique ID for each person surveyed.  The code I’m using is only relying on a random number generator, depending on the size of your sample you will probably need a better solution with higher entropy or with a good locking counter.  Here is the code and page:

<html>
<body>
<h1>Welcome to this survey</h1>
<form action="https://byu.qualtrics.com/SE/" method="get">
<?php
$temp = rand();
?>
   <input type="hidden" name="SID" value="SV_40Hbb2wJvO9yz8p">
   <label >This is your code: </label>
     <input name="panelID" type="textbox" value="<?= $temp; ?>"><br>
   <label> What is your Name: </label>
     <input name="panelName" type="textbox"><br>
   <input type="submit" value=">>">
</form>
</body>
</html>
Figure 2
Figure 2

A few important points:

  1. Note that the form directly links to the qualtrics survey and the method is “get”
  2. The input “SID” is the id from the qualtrics survey link
  3. All the variables in the form will be passed by name-value pairs to Qualtrics
  4. I’m using the random number generator from php, this would be innadecuate for most samples except for test purposes
  5. I’m also passing the panelName variable to Qualtrics, you can store this off-site if you don’t want to carry it forward.

Qualtrics Survey 1

This is the first part of your survey, this is where the embedded data comes handy, you find this by clicking “Survey Flow” and then “Add new element here” and selecting “Embedded Data.” You would then add the variables being sent from the Start Page, in our case panelID and panelName. This is the Embebed Data Section:

Figure 3
Figure 3

At this point those 2 variables are visible to the survey and can be used in piped text and will be stored with the rest of the survey data. Figure 4 is an example of using the data in piped text:

Figure4
Figure 4

Lastly on this survey you need to modify the exit page.  To do this go to “Survey Options” then find the section named “Survey Termination” and select the option “Redirect to a URL.” You will have to set this to link to Survey 2 which will be the Off-Site survey.  You will need to pass in the Query String the variables that you are passing forward, in my case it was panelID, panelName and Year, this is the URL I put down:

http://survey.fammijangos.com/Survey2.php?panelID=${e://Field/panelID}&panelName=${e://Field/panelName}&Year=${q://QID2/ChoiceTextEntryValue}

Notice that you have to write after the page a “?” and then name-value pairs with the name of the variable and code from qualtrics.  For the embedded data it looks like ${e://Field/panelID} and for the question it would be something like ${q://QID2/ChoiceTextEntryValue}. Tip: an easy way to create the qualtrics code is to create a question and then tap on the “Piped Text” tab.

Survey 2

This is your Off-Site survey, it can be anything you like, just remember to take the information that you are receiving from Qualtrics in the Query String and storing it and then having it available to pass it on to the next step.  Here is the code and visual of a very simple example:

<html>
<body>
<h1>Welcome to this survey</h1>
<form action="https://byu.qualtrics.com/SE/" method="get">
   <input type="hidden" name="SID" value="SV_8joHvlEF9Qwf80J">
   <label>This is your panelID: <?= $_GET['panelID']; ?></label>
     <input type="hidden" name="panelID" value="<?= $_GET['panelID']; ?>"><br>
   <label>This is your Name: <?= $_GET['panelName']; ?></label>
     <input type="hidden" name="panelName" value="<?= $_GET['panelName']; ?>"><br>
   <label>You were born in: <?= $_GET['Year']; ?></label>
     <input type="hidden" name="Year" value="<?= $_GET['Year']; ?>"><br>
   <label>Your are about <?= 2013 - $_GET['Year']; ?> years old.</label><br>
   <label>What is your favorite color: </label>
     <input type="textbox" name="panelColor"><br>
   <input type="submit" value=">>">
</form>
</body>
</html>
Figure 5
Figure 5

Notice that I’m displaying the values I’m getting but also setting hidden inputs with the value in order to pass them on.  Also notice that the SID is different from the Start Page because I will not be using the same survey, but rather a different one.  I’m choosing to pass all the variables forward, but you could store some of them locally, the only one that you have to pass on is the unique identifier, in my case panelID.

Survey 3

Survey 3 is the second part of the Survey 1.  You will have to do the same things you did with Survey 1 with the embedded data.  This is my example:

Figure 6
Figure 6

Notice all the variable I’m gathering, the only one that you have to import is the unique identifier, in my case panelID. At this point you can use all the variables inside the survey and the survey will also save all your information.

This is an example of how to display the embedded information:

Figure 7
Figure 7

This is the text:

Your Panel ID is ${e://Field/panelID} and your name is ${e://Field/panelName} 
you were born in ${e://Field/Year} and your favorite color is ${e://Field/panelColor}

This is a report showing how the survey stores all the embedded information:

Figure 8
Figure 8

The final flow looks like this:

Figure 9
Figure 9

One Reply to “Linking Off-Site surveys with Qualtrics Surveys”

Leave a Reply