In the following block add a Text question with the following content.
You are an executive in the Marketing department of ABC Corp. Your annual salary is $.
2. Branch Group Operations *New*
Presenting a single random condition with variables and different blocks was complicated until Qualtrics recently added the Group block as an option. Now we can get a random condition and do multiple actions within it easily.
- Add two new blocks and name them Executive Block and Employee Block.
- Add a text description question in the Employee block that says “After your yearly review, you have gotten a raise.”
- Add a text description question in the Executive block that says “After your yearly review, you have been promoted.”
- To the initial embedded data block add the variables “job” and “department”.
- In “Survey Flow” in the “Randomizer” section click “Add New Element Here” and select “Group”.
- Do this twice more for 3 group elements in the Randomizer.
- Drag each salary setting setting block into one of these groups.
- In each group add a Block element and choose employee or executive.
- In each of the groups’ embedded variable blocks set the department and job. Ex. job=graphic designer, department=Marketing.
- Modify the Question after the Randomizer to display the new information.
- Run the survey and see the different conditions and corresponding block in the Randomizer.
3. Populate Embedded Variables from Survey Links
Recently we had a research project with many different subject groups. We had to track employees and managers, as well as the department in which they worked. Rather than create separate surveys, we utilized the survey link to transfer information about our pool. By sending different links to each employee/department combination we can direct the information a little more closely.
- In “Survey Flow” add embedded variables for “employee_status” and “department.” Move this to be first element in the survey flow.
- In our example we can add the following to our anonymous survey link “?employee_status=employee&department=sales”. When someone arrives from that link, the values after the equals sign will be stored in that variable.
- We can then use these values in the survey by adding piped text to our question.
- When a user takes the survey this question will display their status as an employee or employer and what department they work for.
4. Use Numbers to Select From a Fixed List
We do not always want the participants to see those values in the URL primarily because they can be changed easily. If instead we wanted to just use a simple code number we could. Then with simple JavaScript we can “lookup” the text value from a set. Even without the URL piece, we can generate a random number and give someone text from a quick JavaScript snippet.
- Add two more embedded variables “es” and “de” to the initial survey flow element.
- Set the values to randomly assign an integer* value.
- Choose “Set a Value”
- Then “Insert Piped Text”
- Then “Random Number”
- Integer. Min = 1, Max = 2 for “es”.
- Integer. Min = 1, Max = 5 for “de”."" width="392" height="306" />
- This method will only work with positive integers and zero, but I prefer to leave zero as the unknown condition and not set it explicitly.
- Setting these variables must happen at least one page before they are used. The consent page, since it is at the beginning and seen by all, is a good place to add some simple JavaScript for setting values.
- Select the Advanced Question Options (Gear icon) in the consent block.
- Select Add JavaScript.
- Add the sample code from here: Sample JavaScript Index Lookups
- Save and test the survey.
For further info see: Add JavaScript.
5. Export Flow History
Many surveys contain some branching logic. The simplest example is to place people into a control group or test group. But as your logical branching becomes more complex, it can be hard to track how each participant saw the survey. Enter Flow Ids.
- Go to the “Survey Flow” editor.
- In the top right corner, check the “Show Flow IDs” box.
- Each block in the survey will now show a flow identifier. Ex FL_4
- In order to see the order in which a user took the survey you will need to do an additional step before exporting results.
- In the “Data & Analysis” tab, click “Export & Import” and then “Export Data”.
- In the “Download Data Table” window click “More Options”.
- Check the box for “Export viewing order data for randomized surveys”.
6. Integrating Web Service Data Into Qualtrics Survey Loop and Merge
If you have access to a web based data service, you can incorporate it into a survey using a few techniques. Check out our guide to learn Loop and Merge, API calls and some Excel trickery to make any data size workable. Included are more informational links and example code.
7. Hidden Fields and Default Values for Linking Back to Source Material
Another method for tracking which data set a user saw would be to actually enter a tracking code into the answer for a question. This value could be something like an identifier for a book review, a tweet id, an ISBN number or other unique code that allows the researcher to match repeated generic questions back to the material viewed. We like to combine a hidden field and default value answer to do this.
- In survey flow add an embedded data block and variable called “isbn”.
- After the consent block create a new block with Three questions. One descriptive text. One matrix table with two example statements. And lastly one essay answer question with the question text “ISBN number.”
- In the ISBN question click the “Advanced Question Options” gear icon.
- Click “Add Default Choices”.
- Through the dropdown menu choose Embedded Data and “isbn”.
- In our example we made a trivial way to generate “isbn” with random numbers and Randomizer conditions.
- View the survey a few times to see how the essay question gets answered by default and with different values. Try it here visible.
- Now, in the question text for the ISBN Number edit the text and switch to HTML view.
- Add the following code below the text. *The QID number will depend on your survey.
.QID3
8. Embedding YouTube Links or Other Videos
The Research Programming team has done several projects involving video in Qualtrics. We are capable of helping you to embed everything from a single YouTube intro video to randomly serving videos from a library of thousands. We have custom JavaScript modules ready for addition to your survey, but they are a bit more complicated than your normal survey. We are happy to guide you through the process.
Conclusion
Wharton Computing is ready to help you with these Qualtrics hacks. Please email us, we would love to help you get the most out of your research.