I'm not sure which part of the code is not working for you, so I'll repeat the steps:
To use the Race IAT on Qualtrics, you need to
1. Add this code to a multi-line text-entry question (specifically, press the gear icon and select Add JavaScript) :
Qualtrics.SurveyEngine.addOnload(function () {
// hide question and next button
var container = this.getQuestionContainer();
container.querySelector('.Inner').style.display = 'none';
this.hideNextButton();
// load MinnoJS from the CDN (you probably don't need to change this)
var scriptTag = document.createElement('script');
scriptTag.src = 'https://cdn.jsdelivr.net/gh/minnojs/minno-quest@0.3/dist/pi-minno.js';
scriptTag.onload = onLoad;
scriptTag.onreadystatechange = onLoad;
container.appendChild(scriptTag);
// create the root element for Minno
var canvas = document.createElement('div');
container.appendChild(canvas);
// function to proceed to next question
var proceed = this.clickNextButton.bind(this);
// This function gets activated only after MinnoJS is loaded
function onLoad() {
// Run your study (just set the correct URL)
minnoJS(canvas, 'https://cdn.jsdelivr.net/gh/baranan/minno-tasks@0.*/IAT/qualtrics/exampleQIAT.js');
// MinnoJS doesn't know about Qualtrics, we pass a function to inject the results into the question
// For some reason `piGlobal` isn't available so we attach it to `minnoJS`
minnoJS.logger = function (value) {
var el = container.querySelector('textarea');
el.value = value;
}
// At the end of the study let MinnoJS proceed to the next question
// We need to wait a few miliseconds for Qualtrics to register the value that we entered
minnoJS.onEnd = function () { setTimeout(proceed, 100); }
}
});
2. Add a page break before and after the IAT question.
3. Run the study to see that it works.
4. Create a simple server, or use your personal website as a server, as explained in the guide.
5. Copy our example (pasted below) to a text editor on your computer (such as notepad) and edit it to suit your IAT (for a race IAT, use the labels "White people" and "Black people", and use images of White and Black faces). Note that you need to specify the name of YOUR stimuli and the URL to the location of those stimuli on YOUR server.
The task won't work if you don't have the stimuli on your server.
Here is a link to the stimuli often used on Project Implicit's IATs. You can download the race stimuli and use them.
Here is an example of an AMP task that I created, that uses my own stimuli, saved on my server (see the URL under base_url).
6. Change this URL in the code above, to the URL of YOUR server:
// Run your study (just set the correct URL)
Here is my example of a modified URL. 7.
Run the study to see that it works.
If I understand correctly, following step 3, you replaced the URL (step 6) with some other URL on our server. Is that right?