0 votes
in SoSci Survey (English) by s275430 (140 points)

I have created a multipart questionnaire in SoSci with three surveys:
o T0 only records the e-mail address (double opt-in)
o T1 Survey
o T2 Survey
From SONA (our university platform that distributes student credits for participation), I send the participants first to T0, from there with an confirmation mail to T1 and after 3 days via the serial mail to T2 and from there back to SONA.

My aim is for SONA to recognize at the end with a SONA ID which participants have completed all questionnaires up to T2 in order to then distribute the credits accordingly.
This is why I need to pass their ID through all three questionnaires.

Do I have to create an internal sosci-databank in which I save and retrieve the personal ID?

I tried to do so by placing
1. the command
$personID = value('EI01');
$sonaID = value('REF');
dbSet($personID, $sonaID);

at the beginning of T1 to create the internal databank with the personal SONA-ID (or should the code already be placed in the T0 questionnaire because otherwise the SONA ID with which the participants came would already be lost?)

  1. the command
    $personID = value('EI01');
    $sonaID = value('reference');
    dbGet($personID, $sonaID);

    placed at the beginning of T2 (as I understood the SoSci page).

'REF' ist supposed to be my SONA-ID.
However, that does not work. What could be a solution?

  1. In the end of the PHP redirect-command on the last page of T2 I added the slice below to redirect the personal SONA-ID code back to SONA:

redirect('...........&survey_code=%' . dbGet($sonaID) . '%');

but I think sosci cannot retrieve $sonaID.

Hope I gave enough details so that somebody has an idea how to proceeed...?

Thanks a lot in advance!
Marie

1 Answer

0 votes
by SoSci Survey (327k points)

Do I have to create an internal sosci-databank in which I save and retrieve the personal ID?

Yes, this is what I would recommend.

at the beginning of T1 to create the internal databank with the personal SONA-ID

Have you checked the database, if that worked properly? The code looks good, but it depends on the variable names, if it actually works.

However, that does not work. What could be a solution?

Did you test it with a Sona ID in the link? What does the debug information on the page with the PHP code say?

dbGet($sonaID)

This won't work. You'll have to retreive the entry based on the person ID

$data = dbGet(caseSerial());

And than you can do the redirect

$sonaID = $data[0];
redirect('...........&survey_code=%' . $sonaID . '%')
by s040284 (100 points)
Thank you for the response. I now put:
- in the first questionnaire:
$personID = value('OI01');
$sonaID = value('REF');
dbSet($personID, $sonaID);

- and in the second questionnaire:
$data = dbGet(caseSerial());
$sonaID = $data[0];
redirect('https://uni-wuppertal.sona-systems.com/webstudy_credit.aspx?experiment_id=274&credit_token=63b966ec3e3b4888a606295ead0b0001&survey_code=%' . $sonaID . '%', false);

but the response by Sona was "wrong survey_code"
by s040284 (100 points)
I wonder whether an alternative solution could be to transport the individual sona code in the link that is sent by the serial mail, so that the sona code would be inserted as a variable into the T2 dataset. I tried to add &r=%REF& to the link, but this did not do the trick. Is it possible to transport a variable in this way?
by SoSci Survey (327k points)
No, that won't work. What you could do when using a single opt-in, would be to store the Sona ID in the address entry, using panelUpdate(). The database-for-contents solution, however, is not that bad ;)

Let's start with step 1: Do you receive the Sona ID in your initial record?

Then step 2: Is it written into the database for contents?
by s215926 (100 points)
Thank you for your help, we've got it up and running! For documentation purposes we add our procedure how to grant automatically  SONA credits for a two-wave data
collection with SoSci-Survey (two separate questionnaires) here:

Sona link to SoSci-survey:

https://my-company.sona-systems.com/webstudy_credit.aspx?experiment_id=XXX&credit_token=YYY&survey_code=%reference%

Fist Questionnaire, php code on some page to write personID and
sona-ID into content database:

--------------------------
$personID = value('OI01');
$sonaID = value('REF');
dbSet($personID, $sonaID);
--------------------------

Second questionnaire, php code on page before "end"-page.
Uncomment/Comment for debbugging pourposes:

--------------------------
# Debugging (output on webpage):
#html('value("SERIAL"): ' . value('SERIAL') . "<br />\n");
#html('caseSerial(): ' . caseSerial() . "<br />\n");
#html('dbGet(caseSerial())[0]: ' . dbGet(caseSerial())[0] . "<br />\n");

redirect('https://my-company.sona-systems.com/webstudy_credit.aspx?experiment_id=XXX&credit_token=YYY&survey_code=' . dbGet(caseSerial())[0], false);
--------------------------

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

...