0 votes
ago in SoSci Survey (English) by s332786 (120 points)

Capturing Panel IDs via URL Parameters:
I want to pass a unique participant ID (e.g., panelID) through the survey URL (e.g., ?panelID=12345) and store it in the dataset for each respondent. I tried as per the instructions in the manual, and I do not understand how to define the variable to capture the panelID.

I used this code;
$panelCode = value('panelID');
put('panelCode', $panelCode);

But I got an error message

Could you please advise on how to write the URL in this case and how to write the PHP code to define the variable, or are there any other good practices in doing this?

Please help!

Thank you for your time.

1 Answer

0 votes
ago by SoSci Survey (349k points)

The best solution would be to use the (new) "Panel Redirects" element, available as a question type. Unfortunately, the manual i noy et available in English, but the browser's features to translate pages, should do fine for the meantime.

I you want to stay with the traditional solution, make sure to embed a question "device and transferred variables" on the first page, and tell this question to read the PPID GET variable. You'll then have a new variable in the dataset - however, the name depends on the question ID and is shown in the question form.

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

...