Join this month's Badge of the Month 💬 discussion about Qualtrics love to earn your exclusive badge! | Earn Badge >

Redirects to external sites from Qualtrics survey and back again.

IanJukes_1 Wolverhampton
edited March 2021 in Custom Code

Hi Folks

I was wondering if anyone with more experience could point me in the right direction as I've reached the limits of what I can achieve from the helpdesk and supporting info.

I have set up a test survey that takes the participants through a few questions before it redirects them to a simple experiment in Gorilla. The redirect imports the participant Id from the Qualtrics survey into Gorilla so the data can be matched up afterwards. The difficulty I am having is then getting the participants back into the Qualtrics survey afterwards to complete the rest of the questions.

Now, the simplest way would be to set up the redirect URL using a 'descriptive text' question and putting some instructions on it for the participants to click on a URL link that opens up another window for the Gorilla part. The participants would then have to simply toggle back to the Qualtrics window to complete the remainder but there in lies the risk.

I have tried to automate the process by setting a URL redirect at the end of the task in Gorilla back to the original Qualtrics survey, which worked but it took me straight back to the beginning and not to the point in the survey I left it from.

Clearly, I am missing some code in the URL that redirects me back to the Qualtrics survey at the point it left it (if it is possible at all).

Or I could redirect the participants from Gorilla into a totally different Survey but it would require the Participant ID being passed into the new survey otherwise I wouldn't be able to match up the data afterwards.

I am not a programmer so I'm struggling with the correct syntax to use to achieve this.

Any ideas would be appreciated.




  • ahmedA
    ahmedA India Level 6 ●●●●●●

    Are you using the instructions from the Gorilla website? If yes, then what they have mentioned is related to survey termination, so basically, your participants are coming back to the begining of the survey, because they have already completed the survey.

    Option 1: Embed the Gorilla Experiment in an iframe

    <iframe height=500 width=600 src="">

    Change the height and width based on your experiment.

    Option 2: Provide a link so that the experiment opens in a new tab

    <a href="" target="_blank"> Click Here for the Gorilla Expt</a>

    Option 3: Redirect via JS.

    Use this code:

    setTimeout(function () {
    window.location.href = "";},5000)

    It will redirect your participants to the Gorilla support page after 5 seconds.

  • IanJukes_1
    IanJukes_1 Wolverhampton

    Hi Ahmed

    Yes -- I did use the Gorilla instructions and I initially set up the redirect based upon the end of survey, which accounts for the reason it looped back to the beginning when it came back from gorilla.

    The Qualtrics Help Desk told me set it up as a descriptive link which I've done now to avoid this loop.

    I will retry using some of the coded suggestions you provided.

    Many thanks



  • ahmedA
    ahmedA India Level 6 ●●●●●●

    The easiest option is 2. It opens the link in a new tab, so the current survey is also active.

  • Hi @ahmedA

    I am currently trying something similar as @IanJukes_1 . I wanted to try Option 1 you provided (iframe) but I do not have experience in JavaScript or coding etc. Where exactly would I put the code you mention in Option 1?