Translations of this page:

Display Individual Codes or Coucher Codes

This chapter describes different ways of displaying an individual code to the participants (e.g. at the end of the questionnaire). Possible applications for this are:

  • an anonymous reference to the questionnaire/the participant's answers
  • distribution of unique codes (one-time passwords), which are recognized e.g. as test person hours or on a crowdsourcing marketplace (e.g. Amazon Mechanical Turk) as confirmation for filling out
  • distribution of voucher codes (e.g. shopping vouchers) as incentives

Show Record Reference

If it is only a matter of giving the participant a reference to his record, the interview number is usually sufficient. For example, if you want to give participants the opportunity to receive individual advice later.

The number of the data set (CASE, see additional variables in the data output) can be easily displayed using the placeholder %caseNumber%. You might want to add a letter in front of it, as in the following HTML code:

<Your personal participant code is: <strong>D%caseNumber%</strong></p>

Assign Individual Codes

The prerequisite for this is that you have received individual codes in advance (e.g. voucher codes) or have created them (e.g. using the access code function of SoSci Survey at Send invitationsAccess Codesadministration).

Now create a question of type “random number generator” and copy the codes (one code per line) into the field ballots. For type of draw, please keep the default value “Equally distributed draw (draw without put back)”.

A small filter ensures that the questionnaire will display an error message if there are no more codes in the random number generator. If all the codes of a random generator have been drawn, then it's ID with the postfix “_CP” will deliver “1”. If there are still codes in there, then this value will return “0” (see an example below). The following example assumes that the random number generator has the code “RG01” and the text with the error message has the code “RG02”.

// If the random number generator has already been emptied completely
if (value('RG01_CP') > 0) {
} else {
  // Store code in placeholder %code% store
  replace('%code%', 'RG01', 'response');
  // display HTML code with the code (alternatively: include text with the placeholder %code%)
  html('<p>your code is: <strong>%code%</strong></p>');

Note: If you distribute voucher codes, make sure that only authorized participants access the questionnaire. The [:en:survey:mailing|mailing feature]] can be used for this purpose.

Tip: Check with caseTime('hitherto') and value('MISSING') if the participant has earned the code at all.

Search terms: Completion code, voucher, tokens, confirmation of participation

en/create/vouchers.txt · Last modified: 27.05.2024 07:36 by admin
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki