Millisecond Forums

Administering 3 single-category IATs in the middle of a Qualtrics survey

https://forums.millisecond.com/Topic17084.aspx

By nhl - 9/9/2015

I have read all previous threads on integrating Inquisit tasks into Qualtrics surveys on this forum as well as instructional pages provided by both Millisecond (http://www.millisecond.com/support/docs/v4/html/howto/interopsurveys.htm) and Qualtrics (http://www.qualtrics.com/university/researchsuite/developer-tools/api-integration/passing-information-through-query-strings/), but I am simply confused... I also called the Qualtrics support center, but they don't know how it is accomplished, either. I sent them all the relevant threads from this forum so that they can look into what I need to do on my Quatrics survey's side, but it has been a week since I sent them the information, and I have yet to hear from them. Can anyone walk me through step-by-step what I need to do on both the Qualtrics' and Inquisits' sides to make my study work? Below, you will find the basic procedure of my study:

1. Participants will complete several measures on Qualtrics
2. Participants will be re-directed to Inquisit web 4 to complete all 3 single-category IATs in a random order 
3. Participants will be re-directed back to Qualtrics to complete the rest of the survey

And, this is what I have done so far:
1. Created an entire survey on Qualtrics. But, this survey has an empty block to which a link to Inquisit web 4 tasks should be inserted
2. Created three separate scripts for single-category IATs (modified version of the script developed by K. Borchert)
3. Created a separate script for <batch> command to randomize the presentation order of three IATs (this script can be found here: https://www.millisecond.com/forums/Topic17047.aspx)

Based on my reading, I know I need to have Qualtrics generate unique ID as participants start completing the survey and that unique ID as a URL query parameter must be passed to and from Inquisit so that participants do not have to manually enter their unique code on each site. But, how do I get that URL query parameter? How does it look like? When I call the Qualtrics support center next time, what is the right way to ask this question?

I also understand that I need to enter that URL query parameter while I am setting up the Web Script Wizard. But, where exactly do I have to put the information? Again, how does the URL that is supposed to be entered during the Web Script Wizard look like?

Thank you for your time and help in advance!
By Dave - 9/9/2015

> Based on my reading, I know I need to have Qualtrics generate unique ID

Qualtrics generates that ID automatically. You do not need to instruct it to do so explicitly.

> But, how do I get that URL query parameter?

As detailed in the Qualtrics documentation, the variable in Qualtrics that holds that id is called ParticipantID. You need to forward the value of that variable to the Inquisit launch page in an URL query parameter as detailed under the heading "To pass information from a survey:" at http://www.qualtrics.com/university/researchsuite/developer-tools/api-integration/passing-information-through-query-strings/

> I also understand that I need to enter that URL query parameter while I am setting up the Web Script Wizard. But, where
> exactly do I have to put the information?

In the example in the Qualtrics documentation topic above, the query parameter is called "ID". You can either use the same name or call it something else. The important thing is that you enter whatever query parameter name you have chosen in Qualtrics into the Inquisit launch page: The launch page must know the name of the query parameter it is supposed to read out and use as subject identifier.

> Again, how does the URL that is supposed to be entered during the Web Script Wizard look like?

This is something Qualtrics support ought to answer. I do not know whether Qualtrics has the capability to pick up a survey where it has been left off after redirection to another site. It may be that you actually need to set up *two* Qualtrics surveys, as in
#1: Pre-Inquisit Qualtrics survey
#2: Redirect from #1 to the Inquisit launch page, include the Qualtrics ParticipantID as query parameter
#3: Redirect from #2 to URL for post-Inquisit Qualtrics survey. Have that survey read out / use the same query parameter such that all three components (Qualtrics survey 1, Inquisit IATs, Qualtrics survey 2) use the same participant identifier.

The way to have Qualtrics read in information from query parameters is also covered at http://www.qualtrics.com/university/researchsuite/developer-tools/api-integration/passing-information-through-query-strings/ , under the "Passing Information Into a Survey" heading.

Hope this helps.
By nhl - 9/10/2015

Thank you for your advice. I am still unfamiliar with Inquisit so I am still having trouble understanding what exactly I need to do. I forwarded your response to my original question to the Qualtrics support center, but we still have not be able to figure out how to integrate IATs into the Qualtrics survey... It would be great if you could point out where I am making mistakes during the Web Script Wizard.

1. "Choose a Web Host": I selected "I would like to host my experiment on millisecond.com" and chose my batch command script.
2. "Upload Other Files": I uploaded three additional scripts (one for each single-category IAT) and 24 JPEG files (eight pictures for each IAT)
3. "Choose Launch Page": I selected "Use default launch page"
4. "Configure Launch Page": I left the first two boxes unfilled as they are optional. For "Choose how subject ids should be generated," I selected "URL Query Parameter" and then entered "?RID=${e://Field/ResponseID}" For "Choose how the group id should be determined," I selected "sequential." I am not positive if "sequential" is the right one here though... Finally, I left all five download technologies checked.
5. "Select a Finish Page": I selected "Redirect to a url on a different web server," and then entered the following anonymous link generated for my Qualtrics survey: https://qaz1.az1.qualtrics.com/SE/?SID=SV_aVJsIxvLV4UViFD 
6. The Web Script Wizard gave me http://research.millisecond.com/nhagiwara/batchcommand.web as a launch URL. 
7. I copied and pasted this URL into my Qualtrics survey as part of the instruction text. Participants are instructed to manually click the link in order to start IATs.

We test ran the Qualtric survey, but we received an error message after clicking the link, saying "The page at research.millisecond.com says: Failed to get subject id. The unit has no parameters." You can see a screenshot of this error message here: http://screencast.com/t/mRubKCE7dE

To address this error, we changed the link in the Qualtrics survey by adding ?RID=${e://Field/ResponseID} at the end. So, the link reads: https://qaz1.az1.qualtrics.com/SE/?SID=SV_aVJsIxvLV4UViFD?RID=${e://Field/ResponseID}
This did not fix the issue, and we recevied the same error message.

By Dave - 9/10/2015

Step #4 is wrong. You enter the *name* and *only the name* of the query parameter.

Instead of

?RID=${e://Field/ResponseID

you enter

RID

and RID only. RID is the name you have given to the relevant query parameter.

Step #7 is also wrong. You must make sure that *Qualtrics* appends the RID parameter to the URL. Again, this is done on the Qualtrics-side using "Piped Text Codes" as detailed in the Qualtrics documentation topics already discussed.
By rachaelf - 9/15/2015

I am a product specialist with Qualtrics trying to help Nao set up this integration. As far as I can tell we have done step #7 correctly. As Nao mentioned in her previous post we used *Qualtrics* to add a query parameter containing a unique ID using piped text as shown here: https://qaz1.az1.qualtrics.com/SE/?SID=SV_aVJsIxvLV4UViFD?RID=${e://Field/ResponseID}. When we try to use this link we get this error message: http://screencast.com/t/QQFG5h40jQPJ. I have no idea what this means or what we are doing wrong. She has corrected step #4 so that the parameter name only says RID. Do you have idea what else could be going on?

Thanks
By Dave - 9/15/2015

Hi Rachel,

Your screencast link unfortunately gives a 404, hence I cannot comment on the error. In short, what you need to do is:

(1) Have *Qualtrics* forward its ID to the Inquisit Launch page in a query parameter (you chose the name "RID" for said parameter). This happens entirely on the Qualtrics-side using your platform's "piped text" feature.
(2) Set up the Inquisit launch page to *retrieve* the value of the "RID" query parameter and use that as subject id in the Inquisit Web experiment. This is done entirely on the Inquisit-side of things (step #4 in the previous discussion in this thread). 
(3) Tell Inquisit Web where to redirect to once the Inquisit portion is done. That's also done on the Inquisit-side of things and only the applicable URL needs to be specified (e.g. to another Qualtrics-survey). No query parameters need to be included here: All query parameters that *came in* to the launch page will automatically be appended to the outgoing URL.
(4) If necessary, have the 2nd Qualtrics survey *retrieve* the value of the RID query parameter. This, again, happens entirely on the Qualtrics-side.

Hope this helps.
By rachaelf - 9/15/2015

It really seems like she is doing everything on the qualtrics end is set up correctly. If you copy and paste the screenshot into your browser instead of clicking on the link it should work. Does that give you any more information?
By rachaelf - 9/15/2015

*It seems like everything on the Qualtrics end is set up correctly
By Dave - 9/15/2015

Hi Rachel,

Thanks for the additional information (and the tip regarding the screencast link). Problem is that the various files uploaded by the user was broken / not in any valid encoding. Moreover, the script itself contained a number of errors, in that the file names provided in the <batch> elements did not match the names of the files actually uploaded to the server. I have taken the liberty to fix those issues.

There is, however, one problem that I cannot fix on the user's behalf. One of the image files uploaded to the server is *not* a valid image file and the script that relies on it will not run as a consequence. The file in question is called "asian6.jpg" and the script that relies on it is "SingleTargetIATAsian.iqx". I can say with certainty that the respective file is not a JPG image (I don't know what kind of file it is), but since I don't have access to the original source images there is nothing I can do to resolve that.

Once the user has replaced the above image with a valid JPG, the web experiment should run provided that everything on the Qualtrics-side is indeed set up properly.

Hope this helps.
By nhl - 9/15/2015

Thank you very much for both of your help! I test ran the survey from the beginning using the link that will be sent to participants (instead of the preview survey). There is one more issue---once IATs are done, it opens a new tab and the Qualtrics survey starts from page 1 again... I can create two separate surveys because participants will be randomly assigned to four different conditions before IATs and the rest of the survey after IATs depends on the condition they were randomly assigned.
By Dave - 9/15/2015

> There is one more issue---once IATs are done, it opens a new tab and the Qualtrics survey starts from page 1 again...

I don't know which means (if any) Qualtrics provides to have a survey on their platform pick up where participants left off. This would be something Qualtrics support should be able to answer.

> I can create two separate surveys because participants will be randomly assigned to four different conditions before IATs and
> the rest of the survey after IATs depends on the condition they were randomly assigned.                               

A solution to this would be to forward the assigned *condition* via a query parameter as well. Your 2nd Qualtrics survey would have to be set up to read in the value of the query parameter and then progress accordingly (i.e. administer the questions pertaining to the assigned condition).
By rachaelf - 9/15/2015

Hi Nao, that is a Qualtrics question and we can try to work something out.
By nhl - 9/16/2015

Rachel has been looking into this issue from the Qualtrics side, and this is what she's found:

"When I take your survey and get redirected from inquisit back to Qualtrics this is the link it redirected me to: https://qaz1.az1.qualtrics.com/SE/?SID=SV_aVJsIxvLV4UViFD&&RID=R_psXp6zEoLPozUn7
It looks like inquisit is automatically adding the RID=ResponseID to the end of the redirect URL which is a problem. This makes it a different link from the one the respondents started in, which is why it is starting a new session. We need to work with Inquisit so that they aren't automatically adding the query at the end. "
By Dave - 9/16/2015

> It looks like inquisit is automatically adding the RID=ResponseID to the end of the redirect URL which is a problem

That's correct. And it's exactly what Inquisit is supposed to do by default. If Qualtrics is unable to simply ignore the query parameter, here's what you ought to do on the Inquisit side:

Modify your *scripts* (not the launch page) to set the URL to redirect to by having them set the defaults.finishpage property. In every <expt> element in each of your three IAT scripts you would add

<expt>
/ onexptbegin = [defaults.finishpage = "https://qaz1.az1.qualtrics.com/SE/?SID=SV_aVJsIxvLV4UViFD"; ]
...
</expt>

That will get rid of any and all query parameters that originally went into the launch page.
By nhl - 9/16/2015

I think it is working now. Thank you again for your assistance. I will have several students test run it this week. If we see additional issues, I will definitely come back to this thread. But, again, thanks!
By nhl - 9/21/2015

After test-running the study, we found that the transition from/to Qualtrics is not as smooth and carefree as we hoped... So, the major issue is that, once participants are done with the IATs, they are brought back to the last Qualtrics page they were on with the link to Inquisit. During the test run, some of my research assistants thought that a page popped up after IATs was a new one with a new link so they clicked on the link again only to found that they were brought back to Inquisit for the second time. Assuming that not all participants will be reading the instructions very carefully, this mistake would like to happen to multiple people. 

Ideally, we would create two surveys as you suggested previously: pre-Inquisit and post-Inquisit. However, there are two issues with this approach. First, participants will be randomly assigned to one of four experimental conditions in the pre-Inquisit survey, and the last part of the post-Inquisit survey would depend of the condition participant received in the pre-Inquisit survey. So, we need to pass condition information as query, in addition to response ID, back and forth between Qualtrics and Inquisit. But, the second issue is that Inquisit allows us to enter only one URL to re-direct us back to Qualtrics. Based on my conversation with a Qualtric specialist, in order to pass condition query, we need to be able to enter four URLs (one for each of the four experimental conditions).

Finally, I would like participants to install Inquisit program immediately after consenting. I remember there was a thread on this topic discussing an exact command that we need to insert to achieve that. But, it seemed like those posted commands were not working, and I don't think working command was ever posted, if I remember correctly... Can you please let me know the exact command and where I need to insert that command? Thanks!
By Dave - 9/21/2015

> After test-running the study, we found that the transition from/to Qualtrics is not as smooth and carefree as we hoped... So,the
> major issue is that, once participants are done with the IATs, they are brought back to the last Qualtrics page they were on
> with the link to Inquisit. During the test run, some of my research assistants thought that a page popped up after IATs was a
> new one with a new link so they clicked on the link again only to found that they were brought back to Inquisit for the second
> time. Assuming that not all participants will be reading the instructions very carefully, this mistake would like to happen to
> multiple people.

You may want to explore options for resolving this on the Qualtrics-side. E.g. disable the link after a short period of time using JavaScript.

> Based on my conversation with a Qualtric specialist, in order to pass condition query, we need to be able to enter four URLs
> (one for each of the four experimental conditions).

I don't believe this is accurate and would recommend going over this with Qualtrics support again. Qualtrics should be perfectly capable of (1) extracting the value of the condition query parameter passed back and forth and (2) adjusting the survey flow according to that value (i.e., administer a set of questions based on the condition), all within a single survey.

> Finally, I would like participants to install Inquisit program immediately after consenting. I remember there was a thread on this
> topic discussing an exact command that we need to insert to achieve that. But, it seemed like those posted commands were
> not working [...]

The topic you are referring to is https://www.millisecond.com/forums/Topic13622.aspx and the commands therein are working (see the various responses for code using the Web Player instead of the plugin as well as how to test the code). It may be that Qualtrics imposes constraints on custom / 3rd party JavaScript on their platform, but I do not know that. Qualtrics support should be able to provide specifics if so. Alternatively, direct your participants to https://www.millisecond.com/download/inquisitweb4.aspx prior to the Qualtrics survey or embed that page at the start of your survey.

Hope this helps.
By nhl - 9/24/2015

I talked to the Qualtric support center, and they said it would possible to specify the condition for the second survey if we can attach more than one query parameters to the end of the URL that will redirect participants from Inquisit back to Qualtrics. We would be to attend Response ID as well as the condition parameter. How can I set this up on the Inquisit end? I see a box to enter the name of the url query parameter that contains the subject id in the Web Script Wizard. Where should I put the the url query parameter that contains the condition?
By Dave - 9/24/2015

There is nothing you need to configure on the Inquisit end. Any and all query parameters that come in to the launch page will automatically be appended to the outgoing URL when Inquisit redirects (here: back to Qualtrics / the 2nd Qualtrics survey).

I.e. if you pass two query parameters from the 1st Qualtrics survey to the Inquisit launch page, Inquisit will keep those parameters when it bounces you to the 2nd Qualtrics survey. Whether you have Inquisit Web *use* one, both or none of those parameters does not matter.

What you will have to do, though, is the changes you made to the scripts' <expt> elements discussed earlier in this thread:

https://www.millisecond.com/forums/FindPost17150.aspx

Those changes were necessary to get *rid* of incoming query parameters upon redirection (which is what you wanted / needed at the time). Now you'll want to *keep* incoming query parameters.
By nhl - 9/24/2015

Thanks. There is another question: I get an error massage when I try to download Inquisit 4 Web from the the link you provide for participants to download Inquisit 4 Web (https://www.millisecond.com/download/inquisitweb4.aspx). The message says "Inquisit 4 Web Player cannot be installed on Windows XP/Vista/Windows 7/Windows 8x64. I think many participants would be using Windows 7/8 x64...
By Dave - 9/24/2015

I don't know why you get that error message and I've been unable to reproduce it. Inquisit works fine under 64-bit Windows. The only alternative I can suggest is providing direct download links to your participants. Those are

32-bit Windows:
https://www.millisecond.com/download/4/4_0_8_0/player/win32/IQWebPlayerSetup.exe

64-bit Windows:
https://www.millisecond.com/download/4/4_0_8_0/player/win64/IQWebPlayerSetup.exe

OSX:
https://www.millisecond.com/download/4/4_0_8_0//player/mac/Inquisit_Web_Player_4080.dmg
By nhl - 9/24/2015

The second link worked! But, if I used these direct links, participants need to know whether their PC is 32 or 64.... Can you look into why the general download link was not working?
By Dave - 9/24/2015

We'll surely be looking into this, but as I already said I haven't been able to reproduce this so far, i.e., I'm not seeing any error message under 64-bit. So there's probably some additional factor involved (e.g. a specific browser or browser version or other system characteristic) that I'm not catching.

Thus, for the time being, the direct links are the best option I have to offer.
By nhl - 9/25/2015

I am having several of my RAs test run the study, and I got the following message from one of them: "I had trouble downloading the application needed to proceed to the other portion of the study and also had trouble when clicking the E and I, it wasn't working when i clicked them so i had to hold " ctrl + E." No one else had the issue with I and E, so I don't think it is the script... Any idea?
By Dave - 9/26/2015

No idea offhand. First of, as far as I can see the script doesn't require *clicking* E or I, but rather *pressing* the E or I key on the keyboard. I'm also not sure what "CTRL + E" should do. Unless it's specified as a custom /quitcommand, that key combo should not do anything (the standard key combinations are CTRL+B to skip a block and CTRL+Q to terminate the entire script).
By Dave - 9/26/2015

No idea offhand. First of, as far as I can see the script doesn't require *clicking* E or I, but rather *pressing* the E or I key on the keyboard. I'm also not sure what "CTRL + E" should do. Unless it's specified as a custom /quitcommand, that key combo should not do anything (the standard key combinations are CTRL+B to skip a block and CTRL+Q to terminate the entire script).
By nhl - 9/27/2015

Right... I am pretty sure that the student meant "pressing" not clicking. Six other students were able to complete the IATs with no "I" and "E" issue, so I am 100% it is not a script issue.

There are other issues reported by the students over the weekend:
- 1 student reported that she received a pop-up message about the session being outdated after she was done downloading the program at the beginning of the study. But, when she clicked "ok" the Qualtrics survey started with no problem.
- 1 student reported that he was not able to download Inquisit and received the same error message that I mentioned earlier on this thread. He uses Windows 7. Previously, I had this issue when I tried to redirect participants to https://www.millisecond.com/download/inquisitweb4.aspx. This time, I had JavaScript embedded into the Qualtrics survey instead of posting the typed link. Of multiple students test-running my study, he was the only one who has not been able to download the program.
- 2 students reported that the second Qualtrics survey did not come up after IATs. 


By Dave - 9/27/2015

#1 sounds like a Qualtrics issue to me.
No idea about #2, unfortunately.
#3 could be a Qualtrics issue as well. Alternatively, I've seen a few cases where for some reason query parameters are lost when (1) the person is using Internet Explorer 11 and (2) the web player launch method. If this is the case, workarounds would be either (a) using a different browser or (b) using a different launch method (several alternatives are available for IE).

Hope this helps.
By nhl - 9/27/2015

I have already talked to the Qualtrics, and they think the issue 1 ("outdated" message) is on the Inquisit side...
By Dave - 9/27/2015

The problem is that there is nothing on the Inquisit side that would produce such a message ("outdated session"). Inquisit does not do any session management. I'm afraid Qualtrics staff is mistaken here.
By nhl - 10/9/2015

One of my students got the following error message after completing one of the three IATs. What does it mean?

https://www.millisecond.com/forums/uploads/images/3efa82bf-da4f-4aad-993f-925f.png
By Dave - 10/9/2015

The message suggests a mistake in the respective script, specifically it indicates tht in <trial instructions> no valid response is defined. A <trial> can only accept "no response" if a timeout or fixed trialduration is specified -- otherwise the <trial> would never end.

If you look at the errors in your logs at https://www.millisecond.com/myaccount/logs/errors.aspx?webscriptid=9856&webscriptname=batchcommand , those suggest that the encoding of your *.iqx files is botched. If you review this very thread, you'll also notice that this isn't the first time this happened with scripts you edited and uploaded. All the errors, including the one depicted in the screenshot, likely stem from this fact. The files are not valid and Inquisit consequently can't parse and execute them properly.

I'd like to know why that is, hence my question: Are you using Inquisit 4 Lab to edit those files or are you using some other application?

Thanks!
By Dave - 10/9/2015

Adding a little more information I've been able to glean from the logs: The error referenced in the screenshot occurred with the script "SingleTargetIATBlack.iqx", which was the final script in the condition the respective participant was assigned to. I've pulled all the scripts from the server and the files that are up there currently are encoded just fine and run as expected as far as I can tell. There also isn't any error in the script's instructions <trial>. That may mean that the file was corrupted during the download, which is rare but can happen. Hope this helps.