Using Surveys to Verify Email Addresses

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.

  1. On the Design page, select Options from the white navigation bar
  2. Select Custom Variables
  3. Click Add Custom Variable
  4. Add a name and a label for the variable - using 'email' will work for both of these

With the variable set up, create a single text box question on the survey. This is what will receive the email address from the first survey, once we’ve set up the email trigger.

We then need to set up the question to receive the email address as a default answer

Follow these steps:

  1. Click Edit Question for the question
  2. Check the Question Size and Positioning checkbox
  3. In the Default Answer field, type [variable(email)]

(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 open the survey on the collect page and copy the tracking 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

  1. Go to the Survey Design page of your survey
  2. In the white navigation bar at the top of the screen, hover your mouse pointer over Options
  3. From the drop-down menu, click Email Triggers
  4. Click the green Add Email Trigger button, then Create from Scratch
  5. For the “To” address field, click “insert piping” and choose the question where you asked the respondent’s email address. You should see something like [question(123456789)] in the box
  6. Add the email content. You should explain in the email that you need the user to click the link below to confirm their email address
  7. 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” address
  8. 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.

  1. Open the Verification Survey
  2. Select Edit Question for the question
  3. In the CSS Class box, type 'hidden' (Do not click the “hide question” checkbox. This does something else)
  4. 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.


Was this guide helpful?