If you’re using surveys to collect email addresses, it can be a good idea to include a verification step to ensure that the collected address is correct.
This is simple to achieve using SmartSurvey. This guide will explain how to use the Email Trigger, Piping, and Custom Variables features to create a user flow that will verify collected email addresses.
You will need an Enterprise account to use the features in this guide
Two Surveys: Collection and Verification
To do this, you will need to create two surveys. The first survey is simply there to verify the collected data and the second one is the one you’ll use for data collection. The first (Collection) survey can be of any length, as long as it contains a text question to collect an email address.
Setting up the Verification Survey
The second (Verification) survey needs to be set up in a very specific way, by creating a custome variable.
- From the Home page, click on My Surveys in the blue navigation bar on the left of the page
- Click on the green Create New Survey button at the top of the page, select Start From Scratch, and finally name it how you like and click the blue Create Survey button. For this guide I'll be using the names Collection and Varification.
- Now within the Survey editor, select Custom Variables from the white navigation bar to the left of the page
- Click the green Add Variable button in the popup window
- Add a name and a label for the variable - using 'email' will work for both of these
With the variable set up, we need to create the question that will recieve the email address from the first survey, once we've setup the email trigger. This question will be a single textbox question with a default answer.
Follow these steps to set this up:
- Click the green Add a Question button
- Select the Single Textbox question type from the popup window
- Enter your desired question text in the Question box, then navigate to the Options tab at the top of the popup window
- Toggle the Default Answer option from this list
- Click in the Default Answer field, then on the Insert Piping box that appears. Mouse over Custom Variables and select the email variable we set up earlier. (You can varify this has worked correctly if the text in the box reads: "[variable(email)]" <- where email is the name we gave our variable)
- Click the green Save Question button
(You can find a fuller guide to default answers here)
The second survey is now ready for testing, so the last step before we go back to the first survey is to click on the Collect tab at the top of the survey editor and copy the Default Link somewhere as we’re going to need it.
Back to the Collection Survey
Assuming our collection survey is complete (if not, do it now), then we need to set up an email trigger that will send when the survey response is complete.
The generic guide to creating an Email trigger is here
For this situation, we need to modify a couple of steps
- When in your Collection survey (found in My Surveys using the stepts above) make sure you're within the Build tab located in the white navigation bar at the top of the page
- In the white navigation bar to the left of the screen, click on Email Triggers
- Click the blue Add Email Trigger button and in the dropdown, select Create from scratch.
- Click the green Next Step -> button
- The Internal Name can be any lable you like, this is simply a title you will see your end and isn't visible to the respondent
- Select your desired email address for the trigger to send from using the Reply Email Address drop down box
- For the To Email field, click the green Insert Piping under the text box and choose the question where you asked the respondent’s email address. You should see something like [question(123456789)] in the box
- Enter your desired email subject line using the Subject text box
- Add the email content to the Body text box. You should explain in the email that you need the user to click the link below to confirm their email address
- Add the link to the verification survey as part of the email content. At the end of the link, without adding any spaces, "type ?email=" and then insert the same piping code that was used for the To Email box
- Click the green Save Email Trigger button
With the trigger set up, the flow can be tested, so visit the “collect” tab of the collection survey, open it and visit the link. Preview mode can’t be used for testing this, so once testing is complete, you should clear the responses from both surveys before putting the survey to the public.
Testing Checklist:
- When you complete the collection survey, you should receive an email with the link in it to the verification survey
- The Link should have the email address on the end of it, after ?email=
- When you click through to the verification survey, you should see the Email address in the answer field of the question on the verification survey
Finishing Touches
If all of that works, then the last steps are basically cosmetic: hiding the verification survey question and adding some explanatory text.
- Open the Verification Survey
- Select Edit for the email question and navigate to the Options tab at the top of the popup window
- Toggle the CSS Class box, and type "hidden" (Do not click the “hide question” checkbox. This does something else) It should be all lowercase, exactly as written between the quotation marks above
- Hit the green Save Question button
- From the green + Add Question, add a Descriptive Text question to explain that the respondent needs to click Finish Survey to finish the verification
It’s also a good idea to add some text to the 'thank you' page of the collection survey, explaining that the respondent should expect a verification email.
Once all of this is done, and the surveys are up and running. you will have a list of email addresses in the verification survey that you know have been verified.
Higher Security
As a final note, it’s worth mentioning an alternative method.
Some respondents may not like to see their email address used as part of the verification URL. Instead, the Respondent ID in the link can be used.
This is a unique number assigned to every survey response. By changing this one thing, the verification survey will contain a list of responses for the collection survey that have verified email addresses which can be used, via exports and cross-referencing, to determine your list of verified addresses.
This solution basically trades some convenience on your part for a little extra security.