Study Logic
Table of Contents:
Skip Logic
Skip Logic statements are a great way to ensure that respondents see the question you want them to see. At the bottom of each question, click Add skip logic to configure.
For example, imagine a study question "How easy is it to use the cut & paste feature in Google Docs?" with a response rating scale from 1 to 5.
If the user answers with a 2, it won't make sense to follow up with: "What do you like most about the cut & paste feature in Google Docs?".
Instead, you might consider some routing logic only to show a "What can we do to make the feature easier?" question based on the response/response group.
There are minimum SDK version requirements to support Skip Logic in In-Product Surveys and Feedback Studies. See Features by SDK Versions for details.
| Platform | min SDK Version |
|---|---|
| Web | 2.24.0 |
| iOS | 4.17.0 |
| Android | 2.14.0 |
| React Native | 2.15.0 |
If the SDK version(s) is insufficient, you will still be able to launch a survey, but respondents without the minimum SDK version on the target platform may not be presented the survey, or they will receive a backwards compatible version of the study.
The logic statements that require the minimum SDK versions noted above are:
- Use of logic conditions with AND grouping
- Logic conditions contains and does not contain for Open Text Questions
- Logic conditions that depends on the answer from a previous question
See our SDK Versions by Feature table to determine other limitations based on your SDK version.
Skip Logic in Long-Form Surveys
Skip Logic in Long-Form Surveys functions similarly to how it works in other survey types. However, there are some unique considerations when multiple questions are displayed on the same page. Here are the key points to keep in mind:
- Single Skip Logic button per page: When multiple questions appear on the same page, only one Skip Logic button is available, below the last question. You can still use the responses from any question on that page in your logic.
- Skipping to any question or page: You can skip a respondent ahead to any page or specific question in the survey, even from a page containing multiple questions.
- Skipping to a question within a page: If a respondent is directed to any question other than the first on a page with multiple questions, the questions on that page before the one they're directed to will be hidden from the respondent.
- Removing Questions: If you move the second-to-last question off a page that contains Skip Logic, the page will be removed from the survey, including the Skip Logic rules associated with it.
- Limitations of Skip Logic for Multiple Questions: Skip Logic cannot be used to redirect respondents from one question to another on the same page.
Randomization
Randomization allows you to randomize the order of response options in certain types of questions, questions within a page, and pages within a survey. Randomization helps prevent bias in results and provides a way for questions that come later in a survey to be seen by some respondents instead of being significantly affected by respondent drop-off.
Randomize questions or pages within a survey
- Add a question to your survey
- Click the Randomize button in the Action Bar at the top of the Study Editor. This button won't appear until there's at least one question in the study.
- If you're doing this in a Long-Form Survey you'll have two options:
- Randomize all - randomize all of the pages within your survey and questions that appear together on the same page (questions on page 6 will be shuffled within page 6 but not moved to another page).
- Randomize pages only - randomize pages only; questions that are shown together on a page will stay in the order shown in the Study Editor.
- If you're working on a Feedback or In-Product study, you won't see any options. Randomization in these study types only randomizes all of the pages in the survey since questions in these surveys don't appear together on the same page.
- If you're doing this in a Long-Form Survey you'll have two options:
- Once randomization is applied, a new button will appear to the right of each question or page title indicating that it has been randomized.
- To exclude a question or page from randomization, click the randomization button next to the page or question title. The button will change to a "pin" option.
- Pinning ensures that the question or page stays in the position you've placed it in, for example, if you pin question 3, it will always be the third question for respondents (unless Skip Logic impacts when it's shown).
To remove randomization from a survey, click the button in the Action Bar. All the buttons next to question/page titles will be removed indicating that randomization is off.
Things to keep in mind about survey-level Randomization
- If Skip Logic and Randomization are both applied to a question or page, Sprig will ensure that the destinations of Skip Logic don't come before the questions that route to them. For example, if you randomize a 10 question survey, and question 1 has Skip Logic that points to question 5, question 5 won't come before question 1 even if all the questions in the survey are set to randomize.
- Additionally, if Skip Logic uses a response from a question that came earlier in the survey as criteria, Sprig will ensure that question comes before the Skip Logic that refers to it so that the response is available.
- Survey and page level randomization will not affect the small preview panel that displays to the right of survey questions/responses when viewing a survey while signed into Sprig. To test randomization in a preview, use the full screen preview.
Randomize the order of response options in questions
Randomizing the display of response options is available in Multiple Choice: Single-Select, Multiple Choice: Multi-Select, Rank Order, and Matrix questions.
Displayed choices limit (Enterprise plan only)
When randomizing the choices in a Matrix or Multiple Choice: Multi-Select question, you'll have the option to limit the number of choices displayed to each respondent. This can be useful when you have a long list of options and don't want to overwhelm respondents with too many choices. Pinned options will always display. The question requires there to be at least 3 choices before this setting becomes available.
When viewing survey data, in the CSV export and the Responses tab you'll be able to view which options where shown to each respondent although not the order they were displayed.
Response Piping
There are minimum SDK version requirements to support Response Piping in In-Product Surveys and Feedback Studies. See Features by SDK Versions for details.
By allowing you to pull in a respondent's previous answers to questions and descriptions, Response Piping makes it easy to personalize surveys and provide a more engaging experience.
Availability
- Response Piping is available in Long-Form Surveys, In-Product Surveys, and Feedback studies.
- Response Piping is only available on the Enterprise plan.
To refer to a respondent's previous answer in a question or description, click the Response Piping button in the editing tool bar. This will open a modal that shows all of the previous answers that can be piped into the current question or description. There must be at least one prior question in the survey for the response piping button to appear. When selecting the responses to be piped into a question or description you'll also set fallback text that will be used if the content that should come from response piping is unavailable for some reason. Once the fallback text is complete you'll see a placeholder in the question text that represents the content that will be filled in as the respondent takes the survey.
If you no longer want to use response piping you can delete the reference using the x that appears when you hover over the placeholder, or by deleting it using your keyboard.
In Long-Form Surveys you can pipe from one question on a page to another question on the same page.
Responses to the following question types can be piped into questions or descriptions that come later in the survey:
- Open Text
- Rating Scale
- Multiple Choice Single-Select
- Multiple Choice Multi-Select
- The entire list of selections will be piped.
- NPS
- Matrix
- The entire list of selections across rows and columns will be piped.
- Rank Order
Responses to the following question types cannot be piped into later questions or descriptions:
- Legal/Consent
- Video/Voice
- Text/URL Prompt
- Recorded tasks
Note: Randomization and Response Piping can't be used at the same time. If one has been added to the survey, the other will be disabled.
Attribute Piping
Coming Soon!
There are minimum SDK version requirements to support Attributes Piping in In-Product Surveys and Feedback Studies. See Features by SDK Versions for details.
Use Attribute Piping to create a highly personalized survey-taking experience for respondents by having Sprig dynamically display a respondent's unique attribute values as they are presented with questions. For example, if you store the school or company respondents belong to in Sprig, you could display their specific school or company name in questions instead of something generic like "your company."
Availability
- Attribute Piping is available for Long-Form Surveys, In-Product Surveys, and Feedback studies.
- Attribute Piping is only available on the Enterprise plan.
Important
In order for unique attribute values to be displayed for respondents:
- the value of the attribute must be stored in Sprig ahead of the survey being displayed to respondents
- for In-Product Surveys you must track users; for Long-Form Surveys links with user identifiers need to be distributed (meaning there is one survey link per respondent). Learn more about distributing Long-Form Surveys with personalized links.
Add attributes to questions
Adding attributes to questions follows the same process as Response Piping: above the text field for the question or description locate the piping button, click to open a menu to select the attribute you want to add, fill in a fallback value in case the data is missing for a respondent, and that's it! Additional guidelines:
- Attributes can be added to questions and descriptions.
- Attributes can be added to the first question in a survey (unlike responses).
- The survey preview will show fallback text.
- In Slack notifications, individual responses on the Responses tab, and CSV exports, the exact text displayed to a respondent will be shown; in the Summary tab of a survey, the placeholder text, for example,
city, will be shown. - Attribute Piping can be used alongside Randomization.
- If both Attribute Piping and Response Piping are used in a survey, Randomization won't be available because it can't be used alongside Response Piping.
Launch surveys that include Attribute Piping
No matter which type of survey or study you're adding attributes to, the unique data for each respondent that you want displayed needs to be in Sprig before the survey is rendered/loaded for that user. You can add this data manually through CSV imports or on an ongoing basis with the SDK. If the attribute data is unavailable for any reason or doesn't exist, the fallback text will be displayed.
In-Product Surveys: In order to ensure surveys display attribute data, make sure values for those attributes are set for all respondents who will receive the survey or use Targeting to specify the values/respondents who should receive the survey.
Attributes included in Attribute Piping are not available in CSV exports unless they were included in the targeting criteria for the survey.
Long-Form Surveys: Since Long-Form Surveys are delivered through links, in order for Sprig to know what values to show for attributes it needs to know who is taking the survey. This can be accomplished by including a user identifier, such as the user's id, in the link to the survey. Learn more about distributing Long-Form Surveys with unique links.
Attributes included in Attribute Piping are not available in CSV exports for Long-Form-Surveys.
Updated about 22 hours ago
