connecting mturk to qualtrics to scriptingrt

After describing how to get the mturk worder ID into qualtrics, how to get qualtrics data into scriptingRT, and how to use a code number to give mturk workers something to submit, I now put it all together in one template.

This qualtrics survey

– takes the mturk worker id as a value in the url (here 888888) and puts it in an embedded data field called mtwid; the full link is

– generates a code number mturkcode

– embeds the flash file using swfobject, and transmits mtwid and mturkcode as flashvars

The scriptingRT file imports mtwid and mturkcode, displays it, and appends it to the data it saves.

I exported the qualtrics survey, maybe that’s useful. See also the examples page for for the mturk.swf and mturk.html files.

Survey Flow should look like this. Note that all of these variable names are case sensitive, if you put mturkcode here, it cannot be MTurkCode later.

HTML to put into a text field in HTML View:

<script type="text/javascript" src=""></script>
  <script type="text/javascript">
   var flashvars = {};
   flashvars.mtwid = "${e://Field/mtwid}";
   flashvars.mturkcode = "${e://Field/mturkcode}";
   var params = {}; = "true";
   params.loop = "false"; = "true";
   params.allowfullscreen = "true";
   params.allowscriptaccess = "always";
   var attributes = {};
   swfobject.embedSWF("", "myAlternativeContent", "800", "600", "9.0.0", false, flashvars, params, attributes);
  <div id="myAlternativeContent">
   <a href="">
    <img src="" alt="Get Adobe Flash player" />
<p>Only proceed to the next page after you are told that the data are saved.</p>

One thought on “connecting mturk to qualtrics to scriptingrt

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s