Pass data to a Qualtrics survey and display it in the survey and reports
Qualtrics is an online survey application with many capabilities that aren’t obvious at first glance. I’m currently using Qualtrics to create a feedback form that will be used in several hundred learning modules. This form needs to recognize from which learning module it’s being accessed, and it should determine the author of the module and email them a copy of the user’s feedback.
Qualtrics has a feature called “embedded data” which allows you to pass any arbitrary arguments in the link to the survey. We’ll use this to add metadata to the feedback.
There are three steps:
- Set up a link to the survey that passes “Embedded Data” values
- Set up the survey to access the Embedded Data
- Do something with the Embedded Data
1. Set up a special link to the Qualtrics survey that passes Embedded Data values:
- We need to pass the values of three properties of the learning module:
- The current page URL
- the TITLE of the learning module
- and the author’s EMAIL address.
If in your application these values never change, the embedded data values can be hard-coded at the end of the survey link, but in this example, every learning module has different values for these items, so we’ll use javascript to generate the link. You could just as easily use a server-side language, but that is not an option for this particular application.
The title, and author properties were already exposed in variables in the code for the modules, and the URL property is always available as “document.location”:
- Here’s an example of a javascript function that will append the required values (derived from properties that already exist on the learning module page) to the end of a Qualtrics survey link.
- The printFeedbackLInk() function is called when the navbar for the module is built with Javascript:
- This shows the path generated by the javascript – URL, title and email are all appended to the survey link.The added parameters are URL, TITLE and EMAIL.
- Open and edit the survey in Qualtrics.
- Click Survey Flow.
- Click “Add Below” to add another step. Click Embedded Data.
- Add the parameter names used in your survey link.
- In this case I’ve added URL, TITLE, and EMAIL.
- Select Email Triggers…
- Set up a rule to send an email to the author. I’ve added a check that the value of EMAIL looks like an email address.
To do this select:
“If Embedded Data [EMAIL] is Matches Regex and paste in this regular expression:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
Note: additional, more sophisticated regex formulas for validating email addresses are available HERE.
Click Finish Editing and then Save Triggers.
- Make the title of the learning module show up in the survey itself.
Create a Descriptive Block type question, with Rich Text format.
- Clicking Insert will drop some code into your question.
2. Set up the survey to access the Embedded Data
3. Now let’s do something with the Embedded Data
We’ll do three things with the embedded data: we’ll trigger an email to be send to the module author, display the title of the learning module in the survey to the user, and we’ll report on the title and page number the user was on when they clicked the survey link.
Set up the email trigger to email the feedback to the author of the learning module. Click the Advanced Options dropdown.
In the toolbar of the editing window, click the {a} icon. Select Embeded Data Field and type the name of the field you want to display within the block of text. In this case it is TITLE.
Close the editing window to save the change.
This is what the user will see
Reporting:
Reporting on the embedded data is simple. The values for the current module and page are displayed in the emailed feedback as well as in online reports. Here’s a view of the question selectors in the Reporting window in Qualtrics. You can see the Embedded Data items have been added in the reporting area, so they can be used in conditional filters, in sorting, etc.
Terrific overview Ellen! I have an account with Qualtrics and it looks awesome. I haven’t done anything this advanced yet, but I hope to in the near future.
—–