0 votes
in SoSci Survey (English) by s133003 (150 points)

Hello,
I'm going to conduct a multi-wave study (baseline / after 1 month / after 2 months/ after 3 months) with a daily diary study between baseline (pre-intervention) and second wave (post-intervention). I hope, that after the baseline survey there will be participants willing to be included in a daily diary intervention program, which will last for 26 days (participants will have to log on each day and fill in some questions). I need help, how to create a mailing that would work properly - each day would send a participant a remainder with personal link to the next questionnaire. I prepared opt-in for mailing question (pseudonym), but do not know how to postpone sending the letter for one day (after writing down an e-mail, the letter is sent immediately, nut I need that letter would be sent one day after a participant finish a questionnaire). Knowing how to do this, each day participants would be asked to write down their e-mail for the next day remainder with the personal link.

Could you please help?

1 Answer

0 votes
by SoSci Survey (330k points)
selected by s133003
 
Best answer

I need help, how to create a mailing that would work properly - each day would send a participant a remainder with personal link to the next questionnaire

You will need one copy of the mail for each day, because every addressee will receive each mailing only once.

I prepared opt-in for mailing question (pseudonym), but do not know how to postpone sending the letter for one day

Then this manual should prove helpful: [Multi-Wave Surveys with Self-Recruited Respondents][1]

The strtotime() function is also very useful. It could look like this:

if ($i = 0; $i<28; $i++) {
  $mailingID = $i + 1;
  $day = $i + 1;
  mailSchedule(false, $mailingID, strtotime('+'.$day.' days'));
}

Not that easy? Take a minute and try to understand this code. You will see that it solved a lot of problems :)
[1]: https://www.soscisurvey.de/help/doku.php/en:survey:opt-in-live

by s133003 (150 points)
edited by s133003
Thank you very much for your reply and explanations. And sorry for asking further :). I've read thoroughly manual for Multi-Wave Surveys with Self-Recruited Respondents. But still, I don't get one thing - where php code must be put in?
Should I put it together with opt-in for mailing question on the same page of the questionnaire, or should I put it on the separate page (I wanted to paste down the screenshot, but for some reason, I couldn't)? Or maybe I should do something different at all?

After adding php code with opt-in for mailing in preview mode I'm getting an error message: Questionnaire Error
This interview has not been started in context of a mailing. Therefore, mailSchedule() cannot identify the appropriate recipient.

What this error means and how I could check the mailing otherwise than in preview mode?

I'm sorry for asking so many questions. The SoSci Survey is very user-friendly (manual is very useful as well) and I prepared my questionnaires without any trouble, but the topic with mailing is somehow very unclear for me because I'm not familiar with programming and need your help.

Maybe there would be a possibility to see an example - a screenshot of the questionnaire page with php code to be able to understand where and how it is put?
by SoSci Survey (330k points)
> where php code must be put in?

Simply think page-per-page and within each page from top to bottom. This is where the PHP code runs. And when the bottom of the page is reached, the page is sent to the respondent to collect answers.

So imagine, the PHP code was on the same page as the opt-in question. Then the server would create the HTML output for the opt-in question, then the PHP code runs, and then the page is sent to the respondent.

That means the the PHP code runs before the respondent even sees the opt-in question. The respondent cannot have answered it in that moment.

If you have a double-opt-in, and put the PHP code on the next page, the PHP code can know if the opt-in-question was answered. But it does not know if the respondent will click the confirmation button. To handle only confirmed answers, the PHP will has to be in another questionnaire that is run after the opt-in was confirmend.

> This interview has not been started in context of a mailing. Therefore, mailSchedule() cannot identify the appropriate recipient.

You have two options for the mailSchedule() function, first parameter. This can be the SERIAL of the respondent or "false" if the respondent is known to SoSci Survey. It is known when the interview was started via a personalized link - for example after the opt-in-confirmation. Otherwise, you must tell the function the SERIAL. Where do you get that from? Use value() with the ID of the opt-in question. Again, this won't work unless the opt-in question was asked and answered. That means the PHP code must not be on the same page.
by s133003 (150 points)
Thank you al lot. I think I've got an idea and succeeded in putting the delay in the messaging. Now I'm testing the questionnaires and so far everything looks OK :).

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

...