Survey Routing Based on Respondent Source

While it’s not possible to define a route through a survey directly based on the specific tracking link or email invitation a respondent uses to access a survey, by using custom variables, Hidden questions, default answers, and skip logic, it’s possible to make a survey do this. What we're going to do is, behind the scenes of the survey, convert a custom variable into the answer to a question.

This is an advanced technique, and you should make sure you’re familiar with the listed features below before attempting to set it up.

Basic Skip Logic

Advanced Skip Logic

Default Answers

Custom Variables

Before Starting

Before you get started doing this in Smartsurvey, it’s a good idea to write down on paper which questions are inapplicable to each group of respondents and work out a page breakdown. This will make the later things much easier.

Ideally, you should organise the survey so each set of questions is contained on a single page.

For our example, we assume a 3-page survey. The first page is the welcome page and contains “universal” questions. Page 2 contains questions that only apply to group A and Page 3 has the questions that are just for Group B.

Set up a Custom Variable

In the survey options, create a new custom variable. For the purposes of this guide, we will call it “route”, and that we'll use two possible values for this, A and B.

Create the Routing Question on the First Page of the Survey

The question text is not important, as we won’t show this to respondents, but for the sake of simplicity, let’s call it “routing”.

Edit the Question to Have a Default Answer

Click “Question size and Positioning” to open the advanced question settings. Under the Default Answer box, you’ll see a “piping” box. Click to open the drop-down, choose “route” and click “insert”. The default answer box should now say “[variable(route)]”

Create the Rest of Your Survey

Add the other questions and pages to your survey.

Create Skip Logic Rules

Next to our “route” question, we click “Skip Logic” and create two rules. The first would be set up as follows:

Condition – not equal to
Text: A
Action: Skip Over Page
Page: 2

And save the rule.

Then, create a second rule for the B group:

Condition – not equal to
Text: B
Action: Skip Over Page
Page: 3

And save the rule.

Test the Survey

Go to the collect tab and put your survey live.

Copy the tracking link that’s shown into your browser address bar, and add the following to the end of it:

?route=A

Go to the address. You should see that the routing question has the letter “A” pre-filled for you. Complete the rest of the survey to ensure that you’re shown the correct questions.

Repeat the process, with “B” on the end of the URL and confirm the behaviour works as expected.

Hide the Routing Question

Once you’re happy the survey is behaving properly, then you can make the routing question invisible to respondents. Edit the question, and go to “question size and positioning” as before.

In the “CSS class” box, type “hidden” and save the question. Do not click the “hide question” box. This does something different, which will make the routing stop working.

With this done, the survey is ready for distribution by whichever methods you wish, by using the appropriate version of the URL (ending in ?route=a or ?route=b) for each target group.

Going Further

This was a simple example, but it should be clear that the method involved will work for more complex setups. Because the data is inserted into the survey via the variable, routing questions can appear at multiple points of a long survey if desired, where a survey may branch, come back together, and branch again. There can be as many routes as you need or can map out.

Limitations

There are some limitations to this method that cannot be overcome. The first page of the survey will always be shown to the respondent when they click a tracking link. This is less of a limitation than it may sound though as, if you want your respondents to be shown different questions right from the start, you can always make survey page 1 be a “welcome” page, with solely informational content shown to the respondent.

Was this guide helpful?