$data = panelData();
if ($data) {
put('IV01_01', $data[1]);
} else {
put('IV01_01', -1);
}
**Tip:** Instead of the user-defined field, the team affiliation can also be saved as a "subgroup" as well. That is useful if the serial mails should be sent at different times or if different serial mails should go to the different teams. In this case, ''$data[1]'' would be replaced by ''$data['subgroup']'' in the PHP code.
=== Sending the Serial Mails ===
If you work with serial mails anyway, the questionnaire should also only be editable with a valid serial mail link. To do this, select the "Serial mail" option under **Compose questionnaire** -> //Settings// -> //Access restrictions//.
When sending the serial mail, it is then important to use the wildcard ''%link%'' in the serial mail. This is the only way to send individual links to the participants, which the questionnaire can later use to identify the participant.
==== Access Codes====
If the individual e-mail addresses are not available or if the anonymity of the data is particularly important, you can work with access codes.
**Advantages:** One-time filling can be ensured, it is also possible to collect data in a technically anonymous way.
**Disadvantages:** More effort in inviting participants and some more effort for participants, an anonymous distribution of access codes is essential for anonymity.
=== Create Access Codes ===
Access codes are random strings, e.g. ''ABC98765''. SoSci Survey creates such access codes under **Send invitations** -> **access codes** -> //Administration// -> //Create access codes//. The access codes created in this way can simply be copied and pasted into a spreadsheet (Excel list), where they can be printed out and distributed to the participants.
An additional step is required, however, for attributability to specific groups: Either you note which access codes belong to which group (as an Excel list that you feed back to the data later). Or you can give the access code a group-specific prefix. This can be largely automated in Excel or OpenOffice/LibreOffice Calc with the function ''CHAIN()'':
{{:de:survey:scr.mailing-teams.serials-excel.png?nolink|Adding a prefix to access codes in Excel}}
The original access codes are then deleted from SoSci Survey (**Send invitations** -> **participation** -> //Administration// -> //Delete all access codes//) and the new ones are imported with prefix (//Import own access codes// -> Copy&Paste from Excel).
=== Distribute Access Codes to the Participants ===
First, the questionnaire is configured to ask for a access code when it is called up. For this purpose, the option "access code" is selected under **Compose questionnaire** -> //Settings// -> //Access restrictions//.
The entered access code appears later as variable "SERIAL" in the data set. For anonymity, it is particularly important that the assignment of access codes to participants is done secretly. This is hardly feasible by e-mail, but relatively simple in the context of an employee survey: The access codes are printed out using Excel and Word ([[https://duckduckgo.com/?q=excel+word+labels+print|like labels]]), sorted by department and distributed in envelopes to the departments. There, each employee draws a slip of paper.
The actual invitation to the survey can either also be printed on the slip of paper -- or sent by e-mail. Here, only the anonymous [[:en:survey:url|Link to the questionnaire]] is sent.
==== Marked Links to the Questionnaire ====
Another option is that each group receives its own link to the questionnaire. Either the researcher sends the same link to all members of the group or (if possible) he/she sends the link to the department head, who forwards it to the employees.
**Advantages:** Einfache Handhabung, Anonymität sicher gewährleistet.
**Disadvantages:** Individual participants can fill out the questionnaire multiple times, the link could also be given to third parties and used to fill it out. Prone to error: If the link is accidentally forwarded to the wrong people or if an incorrect link is sent to a group, the group affiliation will not be recognizable later in the data.
Marking a link is done by appending a variable "r" to the [[:en:survey:url|link to questionnaire]]. If the project directory is "employee survey" and the link to the questionnaire (found under **Survey Project** -> **Project Settings** -> //address of questionnaire//) is ''%%https://www.soscisurvey.de/employeesurvey/%%'', then the following three links would be sent to three departments:
* ''%%https://www.soscisurvey.de/employeesurvey/?r=a1%%''
* ''%%https://www.soscisurvey.de/employeesurvey/?r=a2%%''
* ''%%https://www.soscisurvey.de/employeesurvey/?r=a3%%''
When a participant calls the first link, the code ''a1'' is automatically stored in the variable "REF" in the record.
**Note:** There are __no__ adjustments required in the survey project (i.e. no links need to be created in the program or similar). Only different links are typed the emails that you send to the department performance.
**Warning:** Be careful when reusing emails. If you create a mail in Outlook and later copy it to send it to the next department with a different link, then you must make sure that not only the text of the link is changed, but also the link behind it. If you're not careful, something like this can happen: [[https://www.soscisurvey.de/|https://www.example.com]] (the link text here does not match the link behind it, in fact the link points to the home page of SoSci Survey)..
===== Anonymous Records =====
In pair surveys, it is often necessary to be able to assign the data sets of related participants to each other -- but it should not be possible to trace which pair of persons is safely hidden behind a data set pair.
Depending on whether the participants of the survey and their email addresses are known a-priori, the team function is used for serial emails or the question type [[:en:create:questions:email]].
==== Team-ID for Serial Mails ====
If the e-mail addresses of the participants are known in advance, the serial mail function can be used.
For this purpose, a team ID is specified when importing e-mail addresses into the **List of Contacts**. This is simply a sequential number (or other nominal variable) stored in the address table.
^First Name ^ Last Name ^E-Mail-Address ^ Team ^
|Annemarie | Angler |a.angler@example.com | 1 |
|Bernadette | Bauer |b.bauer@example.com | 1 |
|Clementine | Chemiker |c.chemiker@example.com | 2 |
|Dorit | Dachdecker |d.dachdecker@example.com | 2 |
In this case, the first two records represent the first dyad, and the next two are the second dyad. In case of asymmetric dyads (e.g. mother/child, husband/wife or supervisor/employee), the role can additionally be used as a "subgroup. This allows a different invitation email to be sent and a different questionnaire to be completed depending on the role.
^First Name^Last Name ^E-Mail-Address ^ Team ^ Rule ^
|Annemarie | Angler |a.angler@example.com | 1 | Mother |
|Bernadette | Bauer |b.bauer@example.com | 1 | Child |
|Clementine | Chemiker |c.chemiker@example.com | 2 | Mother |
|Dorit | Dachdecker |d.dachdecker@example.com | 2 | Child |
=== Import Address Data ===
The address data is saved as a CSV file and imported into the **List of Contacts** of the survey project (**List of Contacts** -> //Import addresses// -> //Import via CSV file//). Here, the team assignment must be imported as "Team number" , the role (if any) as "Subgroup".
"Pseudonym" must be selected as the data protection mode so that a person identifier is available later in the data set in the "SERIAL" variable.
{{:de:survey:scr.mailing-teams.import-teams.png?nolink|Import of address data from a CSV file with team number}}
uring import, SoSci Survey __randomly__ assigns a 2-letter abbreviation (e.g., "UM") to each team (e.g., each dyad) and stores this internally as a prefix for the person identifier. The personal identifier is not visible to the researcher in the "Pseudoynm" privacy mode, but is stored in each participant's record as a "SERIAL" variable.
For example, the data collected could look like the following:
^ CASE ^SERIAL ^ AB01 ^ SC01_01 ^ SC01_02 ^
| 1 | UMBZA4SEK1P3 | 3 | 2 | 3 |
| 2 | MNQ86C1RRL55 | 2 | 1 | 3 |
| 3 | MNY53E94TFCR | 1 | 2 | 4 |
| 4 | UMLNG7G8ADPE | 2 | 3 | 3 |
The first two digits of the variable "SERIAL" indicate which data sets belong together. However, it is not apparent which team is behind the record pair.
**Important:** The original team number is __not__ saved. There is no way to reconstruct the original team number from the personal identifiers.
=== Send Serial Mail ===
If you work with serial mails anyway, the questionnaire should also only be editable with a valid serial mail link. Therefore the option "Serial mail" is selected under **Compose questionnaire** -> //Settings// -> //Access restrictions//.
When sending the serial mail, it is then important to use the wildcard ''%link%'' in the serial mail. This is the only way to send individual links to the participants, which the questionnaire can later use to identify the participant.
=== Save Subgroup ===
If the participants -- depending on their role -- fill in different questionnaires anyway, the role will emerge from the variable "QUESTNNR" anyway. If the participants fill out the same questionnaire, the subgroup can (optionally) be stored in a [[:en:create:questions:internal|internal variable]] in the dataset.
If you have created the internal variable "IV01_01" in the questionnaire, the subgroup can be saved with the following [[:en:create:php|PHP-Code]] (e.g. on the first page of the questionnaire) in the data set:
$data = panelData();
if ($data) {
put('IV01_01', $data['subgroup']);
} else {
put('IV01_01', '');
}
==== E-Mail to Personal Contact ====
If the e-mail addresses of the participants are not known in advance, you can ask for additional team members (e.g. child, partner, employee) in the questionnaire. Using the question type [[:en:create:questions:email]] for this purpose, you can enable an assignment of the team members to the first record.
A detailed description can be found in the instructions [[:en:create:questions:email]].
In this variant, the order of filling in is predetermined and the first participant must give out and correctly enter the e-mail address(es) of the other participant(s). Once these hurdles are overcome, this variant allows anonymous data collection. This is because the e-mail addresses entered are not stored at any time.
==== Show Link to Forward ====
In the previous solution (email to personal contact), a link is sent by email, which includes a reference to the current interview. In some circumstances, however, you may want to bypass the query of e-mail addresses, for example ...
* ... because the participant is not allowed to enter them in the online questionnaire (although they are not stored by SoSci Survey).
* ... because the participant should invite not only one person, but several.
* ... because the e-mail(s) should be sent directly by the subscriber.
* ... because the links must be sent via WhatsApp, Slack, etc., rather than via email.
In this case, you can also simply display a personalized link in the questionnaire, which the participant should copy and send manually to the other person(s):
html('
Please send this link to your students:
https://www.soscisurvey.de/EXAMPLE/?r=%caseNumber%
');
The ''%%https://www.soscisurvey.de/EXAMPLE%%'' must of course be replaced here with the correct link to the questionnaire.
If you have created several questionnaires in the survey project, make sure that under **Create questionnaires** -> **Manage questionnaires** the questionnaire for the forwarded mails (in the above example the questionnaire for the students) is selected as the default questionnaire. Alternatively, you can specify the questionnaire explicitly in the link ([[:en:survey:url]]), but then you must remember that the ''&'' in the HTML code must be encoded as ''&''.
html('
Please send this link to your students:
https://www.soscisurvey.de/EXAMPLE/?q=students&r=%caseNumber%
');
The variable ''REF'' is then used to store the case number ''CASE'' of the original interview to enable the assignment.
----
Search terms for this guide: pair studies, partner studies, team surveys.