When you use a dynamic completion code, CloudResearch can ensure each worker receives a unique code. In addition, you can set your study up so that each worker who submits the correct code is automatically approved.
Setting up a Dynamic Code in Qualtrics
To setup a dynamic code in Qualtrics, follow the steps below.
- Navigate to the bottom of your survey builder and click on the "End of Survey" block. Once you click the block, you will see an end of survey options panel appear to the left of the survey builder.
- Within the "End of Survey" block, change the Default end of survey message option to "Custom." Then, where it says "Enter Code" click, hover over "My Library" and select "New Message" within the list of options.
- When the box to Create a New Message appears, type "Secret Key" into the description box.
- Next, click on the "source code" button. When you do, the text box below will change to a source code box where you can paste the code needed for the dynamic secret key to operate.
- Once you have the source code box open, paste the code below into the box exactly as it appears.
<iframe width='100%' height='200' id="cr_secretcode"></iframe>
<script>
function createIFrame() {
var ref = encodeURIComponent(document.location.search);
var ifrm = document.getElementById("cr_secretcode");
ifrm.setAttribute("src", "https://app.cloudresearch.com/TakeLaunchedSurvey/DynamicKey/?referrer=" + ref);
}
createIFrame();
</script>
The result should look like this: - Finally, click "Save." The Secret Key you just created should be selected as the end of survey message.
Testing your Dynamic Code
If you want to test the dynamic code to ensure it is working properly, you should do so using the "CloudResearch Survey Preview" associated with your study.
First, navigate to your study and click on it to reveal the extended view. In the lower left corner, find the link titled "CloudResearch Survey Preview" and click on it. You will see the box workers are presented with on Mechanical Turk.
From here, you can walk through your survey by clicking on the study link. If the dynamic code is operating correctly, you should see an image like the one below at the end.
If your code is not working properly or if you try previewing the dynamic code using something other than the CloudResearch Survey Preview link, you will receive an error message like the one below.