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:
http://www.yourawesomesite.com.com?urlvar=value&hidden=value&question=value&static=value
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.
https://www.surveygizmo.com/s3/2892001/Passing-Values-Via-Redirect
Compatible Questions
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*
- Essay
- Checkboxes*
- Checkbox Grid Rows*
- Radio Button Grid Rows
- Dropdown Menu
- Dropdown Menu List*
- Dropdown Menu Grid Rows*
- Slider
- Slider List*
- Likert
- 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.
Admin
— Dave Domagalski on 03/18/2019
@Brendan: Thank you for your question!
We have a number of script examples available via our Developer Resources:
https://luascript.surveygizmo.com/help
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:
https://help.surveygizmo.com/help/surveygizmo-support-hours
David
Technical Writer
SurveyGizmo Customer Experience
— Brendan on 03/18/2019
Is there example scripts of parsing a multiple choice question from URL into hidden variable ?
Admin
— Bri Hillmer on 09/11/2018
@Dorin: You can absolutely do this. Anything you pass into survey 2 will be available to pass out to survey 3. They'll be automatically stored as URL Variables which you can then reference to pass out of the survey. You might also choose to set up a Hidden Value to specifically store the values in survey 2 that were passed in from survey 1. Here are a couple of tutorials that should help you get started:
https://help.surveygizmo.com/help/url-variables#storing-url-variables-for-later-use
https://help.surveygizmo.com/help/hidden-values
I hope this helps!
Bri Hillmer
Documentation Coordinator
SurveyGizmo Customer Experience Team
— Dorin on 09/11/2018
Hello!
Is it possible to send values to multiple surveys?
For example:
I have a set of quizzes used to verify competencies. But depending on the job role the managers what only some tests, not all of them.
I want to build a first survey to collect the contact details (Survey 1) of the candidates, then redirect them to the first test (Survey 2). This is explained in the article, but at the end the the first test (Survey 2) when they get redirected to the next, I also want to send the contact details (Survey 1) to the second test (Survey 3).
Can I do something like that?
Right now I has to create different surveys for each job role and it's very time consuming.
Thank you,
Dorin
Admin
— Bri Hillmer on 03/23/2016
@Amanda: Response ID is not available within the response to pass as it is only assigned once the response is processed. If you need a unique ID to pass out of the response you can use either the survey counter or session id. Here is a tutorial with more information:
http://help.surveygizmo.com/help/article/link/response-id-merge-code
I hope this helps!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Amanda on 03/23/2016
Hello, could someone specify where exactly the "fields to pass" is pulling from? For example, if I want to pass a SurveyGizmo response ID through to a different survey, what is the best way to assure that the response id is passed?