Learn how to setup survey logic based on custom fields passed via the survey URL
Now that we have learned the basics of URL Parameters and how to pass them into your survey via the survey URL or an embedded survey, find out how create survey logic based on URL Parameters.
To set up survey logic based on custom fields, follow the steps below:
1. Go to the Survey Editor and click on Logic.
2. Add a Logic Rule and set a Condition using a URL Parameter.
You can add a logic rule using a URL parameter as the condition either by:
A) Selecting from one of the URL parameters available in the dropdown menu. URL parameters will appear in the dropdown menu if you have added them on the Distribute > Link tab.
B) Typing a new parameter into the field.
In the example below, we are applying the Show rule based on the parameter subscription_plan. Now, respondents with a premium subscription plan will see this question.
3. Grab your survey link from the Distribute tab or test your survey by using the preview mode to ensure the logic is set up as you desired.
- You can set up multiple logic rules or rules on different questions based on different URL parameters.
- Make sure to include the custom fields as URL Parameters in the survey URL or your survey logic will not work.
- You do not need to set a value for the URL parameter and can set up the logic condition to Go To/Show/Skip based on there being any value for the URL parameter at all by defining the logic rule based on Not Blank.