In addition to a Thank-You message you may want to send respondents to an external website when they complete your survey. A URL Redirect Action can do just this! It also gives you the ability to disqualify the respondent and can be used to pass variables to the destination website.
For example, you may be asking someone to try out a new product that may only be available to people 21 and over. You can collect the respondent's age and, if they're under 21, you can use the redirect action to disqualify them and send them to your website. Respondents disqualified in this way will not be able to complete the survey.
You can also use the redirect action to send respondents to your website on completion of our survey.
Check it out in an example survey!
Setup
- Scroll to the page where you would like to add the redirect.
- Click Add New: Action. Select URL Redirect from the list of actions via the + Add button. You can also access the URL Redirect Action via the Insert option available by hovering between any two survey elements.
- Give your action a Name. This is an internal name (not visible to survey respondents) that will help you identify the action going forward.
- (Optional) Toggle the Disqualify Respondent setting to Yes if you wish to override the response status of those respondents that are redirected.
- Enter the website that you would like to redirect to in the URL field. Select either http:// or https:// depending your security needs. The URL field is compatible with merge codes. If you want to merge-in the URL, make sure that the merged value does not already contain the http:// or https:// portion.
- (Optional) By default, URL Redirect actions fire when the page is hit. If you want your respondents to briefly see the page where your redirect is located enter your desired delay in seconds in the Delay field. Note: The delay option is not compatible with JavaScript embeds.
- (Optional) If you have set the Disqualify Respondent setting to Yes in step 4, you can customize the Message to show to disqualified respondents or leave the default messaging.
- (Optional) You can also add Fields to Pass. Any data from your survey can be passed as URL variables to the redirect website.
- Click Save Action when you are finished.
Passing Survey Data Via The URL Redirect
Using the Fields to Pass feature within the URL Redirect Action, you can pass data from your survey in the form of URL Variables appended to the link specified in the URL field. Learn about your options for sending data via the URL Redirect.
Redirect to Different URLs Based On Question Answers
Often, you may have a need to redirect respondents to different URLs based on data collected in your survey.
Let's say that you are selling two different products: Product A and Product B. Each product has its own dedicated website and you want to redirect respondents to the appropriate site based on their selection of either Product A or B in a survey question.
This requires two separate URL Redirect Actions as each action allows for one URL to be specified.
Once you have created each of your URL Redirect Actions, use Logic to determine when each action should trigger. For example, our URL Redirect Action for Product A should only trigger if Product A is selected in our survey question.
URL Redirects in Individual Responses
URL redirects are available via Individual Responses on the Action Log tab. Click on any response and navigate to the Action Log to see where the respondent has been redirected:
Note: The "Redirected to" field will be blank if the URL Redirect is not triggered (i.e. a logic condition is not met or a survey page is skipped by the respondent). This field will also be blank if the URL Redirect action is not on a Thank You page.
What should I avoid?
When adding a redirect action to your survey, consider the placement very carefully. If you'd like to redirect your respondents to another website for reference material, but want them to return to the survey afterward, we do not recommend using the URL Redirect action (as there's no way to return to your survey from it).
Instead, we recommend using HTML to link the external site within the survey page, so that it will open a new window/tab and your respondents don't lose their place in their survey. To learn more, please visit Link to an External Website in Your Survey.
Compatibility
- The Delay setting is not compatible in JavaScript Embeds.
- The URL Redirect Action should not be used in iFrame embedded surveys. Instead, use our documented workaround.
Script for Displaying Countdown Before Redirecting
If you wish to add a timer to a page in order to redirect to an external webpage once the time is complete, you can add this code to a JavaScript Action on the page in question. The following code will redirect to the Alchemer homepage after counting down for 5 seconds, but you can easily change both the location of the redirect and the time spent on the page.
Check it out in an example survey!
- Click Add New Action, select Javascript. Paste the below code into the action editor:
var time = 5; //The number of seconds until redirecting var redirectUrl = "https://www.alchemer.com"; //URL respondent will be redirected to var timer = setInterval(updateTimer, 1000); function updateTimer(){ var x = document.getElementsByClassName("timer")[0]; time--; if(time == 0){ window.location = redirectUrl; } x.innerHTML = "Redirecting in " + time + " seconds."; }
- You can edit the
(var time = 5)
to however long (in seconds) and change the link in thevar redirectUrl
variable to whatever page you wish, then Save the action. - Now add a Text/Instruction element to your survey. If you want to give your respondents more information (such as "You have 5 seconds to complete this page or this survey will self-destruct"), you can add that to the text area. Otherwise, go to the Layout tab and enter 'timer' in the CSS Class Name field and Save.
That's all there is to it!