1. Home
  2. Other Resources
  3. Tips & Tricks
  4. Survey question in invitation mail: How to set it up?

Survey question in invitation mail: How to set it up?

Sometimes you do not just want to put a survey link into the invitation mail. Instead, the first survey question should be shown, and the mail receiver should answer this question by clicking on one of the given answer options which leads to the rest of the survey shown in a browser window.

Let’s look at the following example. The question would be “How satisfied are you with …?”, and there are five answer options from “very satisfied” to “very unsatisfied”. This screenshot is taken from an actually received e-mail:

Each answer option will get the link to the survey, either the personal link or the general link. Additionally, the information which of the answer options is chosen will be used as URL variable value in the links. In this way, the answer of the participant (mail receiver) will be stored in one of the URL variables. URL variable values are available in filter conditions and rawdata exports. The only exception compared to a regular survey question is that URL variables are not available in the online and all other reports.

How does the HTML source code of an e-mail look like for personal links?

The personal link can only be included in an invitation mail when you send-out the invitation directly from Survalyzer (from distribution page). For this purpose you have to use the placeholder {{survey.personal_link}}. To add the value of the given answer, you need to extend the link, e.g. by ?urlvar01=1 (pay attention to the question mark). The following example code uses the URL variable number 1 and values 1 to 5 for the given answers:

<div style="text-align: center;"><strong>How satisfied are you with ...?</strong></div>
 

<table align="center" border="0" cellpadding="2" cellspacing="2" style="width:500px;">
	<tbody>
		<tr>
			<td style="text-align: center; background-color: rgb(28, 172, 49); width: 100px;"><a href="{{survey.personal_link}}?urlvar01=1" style="color: #000; text-decoration: none"><strong>very<br />
			satisfied</strong></a></td>
			<td style="text-align: center; background-color: rgb(189, 232, 3); width: 100px;"><a href="{{survey.personal_link}}?urlvar01=2" style="color: #000; text-decoration: none"><strong>satisfied</strong></a></td>
			<td style="text-align: center; background-color: rgb(255, 211, 0); width: 100px;"><a href="{{survey.personal_link}}?urlvar01=3" style="color: #000; text-decoration: none"><strong>neither/nor</strong></a></td>
			<td style="text-align: center; background-color: rgb(252, 148, 1); width: 100px;"><a href="{{survey.personal_link}}?urlvar01=4" style="color: #000; text-decoration: none"><strong>unsatisfied</strong></a></td>
			<td style="text-align: center; background-color: rgb(241, 0, 13); width: 100px;"><a href="{{survey.personal_link}}?urlvar01=5" style="color: #000; text-decoration: none"><strong>very<br />
			unsatisfied</strong></a></td>
		</tr>
	</tbody>
</table>

Copy this source code into your mail template in the texteditor (source code view). You might adapt the formattings according to your requirements.

How does the HTML source code of an e-mail look like for the general survey link?

In case you want to invite your participants with a mail sending tool outside of Survalyzer, you have to use a static link instead of a Survalyzer placeholder. The static link, e.g. the general survey link, contains the protocol https, the Internet address with your subdomain, the 10 letters hash behind it and the survey language. To add the value of the given answer, you need to extend the link, e.g. by &urlvar01=1 (pay attention to the ampersand). The following example code uses the URL variable number 1 and values 1 to 5 for the given answers:

<div style="text-align: center;"><strong>How satisfied are you with ...?</strong></div>
 

<table align="center" border="0" cellpadding="2" cellspacing="2" style="width:500px;">
	<tbody>
		<tr>
			<td style="text-align: center; background-color: rgb(28, 172, 49); width: 100px;"><a href="https://mysubdomain.datacoll.net/qwertzuiop?l=en&urlvar01=1" style="color: #000; text-decoration: none"><strong>very<br />
			satisfied</strong></a></td>
			<td style="text-align: center; background-color: rgb(189, 232, 3); width: 100px;"><a href="https://mysubdomain.datacoll.net/qwertzuiop?l=en&urlvar01=2" style="color: #000; text-decoration: none"><strong>satisfied</strong></a></td>
			<td style="text-align: center; background-color: rgb(255, 211, 0); width: 100px;"><a href="https://mysubdomain.datacoll.net/qwertzuiop?l=en&urlvar01=3" style="color: #000; text-decoration: none"><strong>neither/nor</strong></a></td>
			<td style="text-align: center; background-color: rgb(252, 148, 1); width: 100px;"><a href="https://mysubdomain.datacoll.net/qwertzuiop?l=en&urlvar01=4" style="color: #000; text-decoration: none"><strong>unsatisfied</strong></a></td>
			<td style="text-align: center; background-color: rgb(241, 0, 13); width: 100px;"><a href="https://mysubdomain.datacoll.net/qwertzuiop?l=en&urlvar01=5" style="color: #000; text-decoration: none"><strong>very<br />
			unsatisfied</strong></a></td>
		</tr>
	</tbody>
</table>

Copy this HTML source code into your mail template in your external mail sending tool. You might adapt the formattings according to your requirements.

How can I use the given answer in a filter condition?

Let’s assume you want to ask for the reasons why the participant had been unsatisfied. In this case you will need a filtered question that is only shown when the answer given in the invitation mail had been “unsatisfied” or “very unsatisfied”. These 2 answers are represented by the codes 4 or 5 which are stored in the respective URL variable. Thus, your filter condition should look like the one in the following screenshot:

Where can I find the answers to the question in my rawdata export?

Whenever something is stored in one of the 20 available URL variables, the variable is shown in a separate column in the rawdata export file. You can find it between the system variables “referer” and “email” at the end of the data table:

Be aware that there is no further information on the URL variable in the codeplan. Keep the mail invitation template to see which answer option is encoded with which code.

Updated on March 17, 2020

Was this article helpful?

Related Articles