If possible, please navigate to the following link:
tinyurl.com/advQualDemo
CSS gives the web style.
Qualtrics gives you full control of the CSS for your surveys.
You can click around in the Look & Feel menu.
Go to Look & Feel > Advanced > Add Custom CSS
Buttons are radio buttons.
The Qualtrics 2014 works very well for mobile.
It is pretty bland, though, so spruce it some!
Having the ability to style everything is great.
It can help make your survey more accessible and branding always looks good.
You will need to know about:
web-based survey design
human-computer interaction
web standards
JavaScript is a core technology for web content.
Try browsing the web with a script blocker!
It is responsible for everything from very basic sliders to some really advanced dynamic visualizations.
What is Qualtrics other than a series of pages?
JS has many different libraries:
jQuery.js is everywhere (autocompletes anyone?)
Raphael.js is great for creating svg
D3.js powers interactive visualizations (NYT)
Prototype
Reveal.js
There are a few different places you can put your JS.
Within the addOnLoad function in the JS editor.
In the JS editor without the addOnLoad function.
In the header.
In the question source.
Flow control.
Creating new variables.
Fun times!
Can be as simple as this:
Qualtrics.SurveyEngine.addOnload(function() {
this.questionclick = function(event, element) {
if (this.getChoiceValue(1) == true) {
this.clickPreviousButton()
}
}
})
Qualtrics.SurveyEngine.addOnload(function()
{
$('NextButton') && $('NextButton').hide();
$('PreviousButton') && $('PreviousButton').hide();
var ros1 = document.getElementById("QR~QID2~1");
var ros2 = document.getElementById("QR~QID2~2");
var ros3 = document.getElementById("QR~QID2~3");
ros1.disabled = true;
ros2.disabled = true;
ros3.disabled = true;
function enableButton(){ros1.disabled = false;
ros2.disabled = false;
ros3.disabled = false;}
setTimeout(enableButton, 10000)
this.questionclick = function(event,element){
if (element.type == 'radio'){
this.clickNextButton();
}
}
});
Using a combination of embedded data and JS enables us to do some interesting things.
We can also use JS to do some interesting things.
Regular expressions (regex) are used to match patterns in strings.
Think about “find & replace” and you are essentially there…
Although very powerful, regex is a bit confusing at first blush.
\$[0-9]+.[0-9]{0, 2}
^[a-zA-Z]+.*[0-9]{4}$
Display Logic for questions, embedded data, panels, and IP.
Sometimes branching on certain text is helpful.
Survey Flow
Custom Validation
Reports
Expression | Action |
---|---|
[0-9] | Number range |
[a-z] | Letter range |
^ | String start |
$ | String end |
. | Wild card |
* | 0 or more times |
+ | 1 or more times |
| | Or operator |
() | Grouping |
{x,y} | Specific matches |
? | Ungreedy match |
As an add-on (read: extra charge), Qualtrics provides an API.
Notre Dame was gracious enough to acquire this add-on.
The most basic explanation is that APIs allow programs to talk to each other.
In addition to program-to-program, APIs also allow programs to chat with servers.
This is where the Qualtrics API becomes useful for us.
List Surveys
Import Survey
Create Response Export
Using the API is probably the most difficult thing that we have discussed.
It really is only useful if you want to integrate it with your statistical programs.
Some programs make it easy (any OOPL), while others make it difficult/impossible.
There are two versions out there: V2 and V3.
exportQualtricsData = function (username, token, format, surveyID) {
url = paste("http://survey.qualtrics.com//WRAPI/ControlPanel/api.php?Version=2.4&
Request=getLegacyResponseData",
"&User=", userName,
"&Token=", userToken,
"&Format=", format,
"&SurveyID=", surveyID,
"&ExportTags=1",
sep = "")
url = gsub("[@]", "%40", url) %>%
gsub("[#]", "%23", .)
exportQualtricsData = read.csv(url, stringsAsFactors = FALSE)
}
exampleData = exportQualtricsData("userName@nd.edu#nd", "userToken",
"CSV", "surveyID")
Right out of the box, Qualtrics can do just about anything you need.
Sometimes, though, we need to add features.
With a little bit of knowledge and fearlessness, we can pretty much do whatever we want.