Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen

Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

+1 vote

I am happy to use Soscsurvey. But I would like to use Amazon's mturk to recruit participants and don't know how to generate the unique completion code.

Mturk offer this option called "survey link", where people get the link to the survey and see a box where they need to enter a code to prove they have finished it and get paid. The code should be provided to them at the end of the soscisurvey questionnaire.
Is there a easy way to do this?
The codes are pre-generated and unique. What I need to do now is to present each participant with one of them after they finish all the questions.

Any suggestions how to do this?

Thank you in advance!

in SoSci Survey (English) by s080681 (125 points)

1 Answer

0 votes

I'd recommend the random generator for this task. Fill in all the codes as content, and draw one code per interview. You should also check how often the random generator has been completes so far (that's an additional variable "...CP" in the data set for the random generator) to ensure that at least one new code was available.

To display the code, just use a placeholder. Here's a sample code if your random generator has the ID "RG01" and you use a placeholder %code% in your questionnaire (e.g. a text element):

question('RG01');  // You may as well drag the RG01 into the page (above)

// Stop right now, if no more codes are available
if (value('RG01_CP') > 0) {

// EITHER Prepare placeholder %code%
// and use this placeholder in some text element below the PHP code
replace('%code%', 'RG01', 'response');

// OR display the code immediately
html('<p>Your code is <strong>'.value('RG01', 'label').'</strong>.</p>');
by SoSci Survey (101k points)
edited by SoSci Survey
Thank you for your reply.

 I have created RG01 and saved all my codes there. I have created a text element "Code" and saved with %code%. What is mean by a placeholder? I want put the at the end. So, which page should I  put RG01? Where should I paste the given script/coding?

Again thanks a lot for your kind support!!
Best regards,
For details on placeholders see https://www.soscisurvey.de/help/doku.php/en:create:placeholders - if you put the code and (below) the text element "Code" on the last "normal" page of your questionnaire (you cannot put active content on the very "last page"), you should be fine.
I am sorry, I have did it but it is not working. Actually, I am a new user and little knowledge about this tool and about coding. Please help me as I am trying for a long time. It would be great if you log in and have a look. My ID: euv39115, Password: <snip>
Thanks a lot indeed.
Please do never post you password publicly online (and change your account's password as soon as possibly). Thank you. We will never login with a user's credentials, but can create an administrator login, if required. Plase also understand that we cannot do the coding for single projects, as there are more than 10.000 of them per years of them on our servers. If the code does not work as intended, please create a new question and describe what is (not) working exactly. Please also read this advice: https://www.soscisurvey.de/help/doku.php/en:create:filter-solving#detect_failures
Ok, I did not realize it was in public. I am very sorry. I have changed my password. Thank you very much.
Hello, Finally I have solved the problem. It is perfectly working. Thank you very much!!
Hi I am having the same issue, since I am a new user I am not sure how to proceed after creating the questions RG01. How did you solve this? could you please help me?
Solved by now? Your other question in the online supports says that it works :)