The URL Redirect Action can be placed on any page following the first page of the survey to redirect survey respondents to a specified URL. As part of the URL Redirect, you can pass along data that pertains to that survey response. This includes data collected in the survey response or data stored in hidden values or email campaigns, such as User ID for panel companies.
To set up fields to pass with your URL Redirect action:
- Scroll to the page where you would like to add the redirect.
- Click Action > URL Redirect.
- Give your action an internal title (something that makes sense to you in the survey).
- Enter the link to the site in the URL field.
- Scroll to the Fields To Pass and select the question, hidden value, or URL Variables you would like to pass in the Question to Send dropdown.
- Under Variable Name click Add Field and enter a Variable Name in the textbox that appears - This is the variable that will be used in the query string added to the end of your URL.
- If you need to pass multiple variables, rinse and repeat Steps 5 and 6 within the same URL Redirect action.
All values will be passed as URL variables with the Variable Name you defined in the Fields to Pass section. For example, the above fields that we set up will look like so in the redirected link:
Best Practice Tip
When constructing URL Variables to use in surveys, we recommend using all lowercase letters for the variable name. This will give you the most reliable results for using URL Variables within surveys, as well as passing, them out of surveys using actions like the HTTP Connect and URL Redirect.
Default Value Options
There are two example ouses for the Default Value field:
- If there is no value for the response for the selected question selected in the dropdown you can specify a value in the Default Value field to be passed.
- You can also use the Default Value field to send extra query string variables that are not collected or stored in the survey response. To do so, select Static Value in the Question to Send dropdown, enter the variable name in the Variable Name column, and specify its value in the Default Value field.
Capturing Values On The Other End
Ok, great, so now what? Once you've set up the values to pass you'll need to figure out how to handle them on the other end. If you're passing them to another SurveyGizmo survey they will be captured automatically as URL Variables. Below we'll cover one of the most common uses of a passed value from survey to survey.
Let's say we are passing a selected option from one survey to the next. Using Default Answers you can prepopulate the answer to a question from the first survey to the second.
To do so, start by setting up an identical question in your second survey (the survey you are redirecting to); the reporting values for the options must be identical.
Next, go to the Layout tab of the question and scroll to the Default Answer field. Click the option to Insert Merge Code and select the URL Variable option (since the values are passed over as URL Variables). Replace the xxx within the merge code with the Variable Name you defined in the Fields to Pass section (this is case sensitive) and save
Want to test it out?
Click this link and respond to the survey and watch your address bar to see the URL variables being passed as part of the redirect.
The data from the following question types can be passed via the URL Redirect:
- Textboxes including Number, Percent, Email, Date
- Textbox List*
- Textbox Grid Rows*
- Checkbox Grid Rows*
- Radio Button Grid Rows
- Dropdown Menu
- Dropdown Menu List*
- Dropdown Menu Grid Rows*
- Slider List*
- Star Rating Grid Rows*
- Drag & Drop Ranking*
- Ranking Grid*
- Image Select Single
- Image Select Multi*
- Contact Form Subquestions
- Custom Group Subquestions
- Semantic Differential Rows
- Open Card Sort*
*Questions that collect multiple data points will be passed as an array. If you are passing to another SurveyGizmo survey these arrays must be parsed using a script.
— Dave Domagalski on 03/18/2019
@Brendan: Thank you for your question!
We have a number of script examples available via our Developer Resources:
However, I’m not sure if any of the examples there will answer your specific question. Please don’t hesitate to reach out to our Support team and they should be able to point you in the right direction with some additional information:
SurveyGizmo Customer Experience