Embed a Qualtrics survey

Adding a Qualtrics survey to your course is now easier than ever. You first want to check to make sure you have your survey created before adding it to Lagunita. Once it's ready, go into Studio and create a new section, subsection and unit the way you would for any other component in your course.

In the new unit, click on "Advanced" under Add New Component. Then, select "Qualtrics Survey".


To add your survey, click the "Edit" button on the page. A box will appear and you will need to fill out the following items:

  • Display name: (optional)
  • Survey ID: It will look something like SV_cU4m80hPGdqqKlz. This is pulled from the Qualtrics URL.
  • Link Text: This is the text that appears on the button users click to get to the Qualtrics survey.
  • Message: This is the message that appears above the button that takes users to the survey.

Once you're happy with your changes, click Save and then Publish. Here is what the survey page will look like:



Alternative option:

If you want to iframe in a Qualtrics survey, use this code in an HTML component:<iframe src="URL_of_your_survey&a=%%USER_ID%%" height="1000" width="800" />

The additional code, &a=%%USER_ID%%, passes an anonymous User ID to your survey so you can correlate responses back to the user who submitted the survey.

The height and width values can be changed as you like, but those values are about the size of a single page so users won't need to scroll, depending on how you set up your survey. 

There is example code for this in the Anonymous User ID HTML component. The code for this type of HTML component includes how to set your survey link to include an anonymous User ID and have your survey open in either a new tab/window (with the target=”_blank” parameter) or be iframed into the page.


Screen Shot 2014-04-22 at 12.56.37 PM.png

To record the anonymous User ID so you can correlate Qualtrics responses back to OpenEdX users, you need to set your survey to look for the “a” value used above. You do this by editing your survey and clicking Survey Flow:


Screen Shot 2014-04-22 at 12.59.43 PM.png


Click “Add new Element Here” and select “Embedded Data”. If your survey already has Embedded Data, you can add additional parameters by clicking “Add a New Field” within the Embedded Data pane:


Screen Shot 2014-04-22 at 1.01.04 PM.png


In the Embedded Data pane, add the value that you are passing in the link (“a” is the default value, but you can make this whatever you like, as long as the value is the same in the link and in the survey Embedded Data):


Screen Shot 2014-04-22 at 12.53.27 PM.png


When you are done, click Save Flow at the bottom of the page.

You can now test that the anonymous User ID is recorded by submitting your survey through the Lagunita course. Once you submit the survey, you should see the “a” value (or whatever value you set up) in your survey results and see an anonymous ID that looks something like this:


Screen Shot 2014-04-22 at 1.08.49 PM.png

Have more questions? Submit a request