Redirects to external sites from Qualtrics survey and back again.

IanJukes_1
IanJukes_1 Wolverhampton Qubie ✭
edited March 23 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.


regards


Ian

Answers

  • ahmedA
    ahmedA India Wizard ✭✭✭✭✭

    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="https://support.gorilla.sc/support/reference/faq/recruitment#qualtrics">
    

    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="https://support.gorilla.sc/support/reference/faq/recruitment#qualtrics" target="_blank"> Click Here for the Gorilla Expt</a>
    


    Option 3: Redirect via JS.

    Use this code:

    Qualtrics.SurveyEngine.addOnReady(function()
    {
    setTimeout(function () {
    window.location.href = "https://support.gorilla.sc/support/reference/faq/recruitment#qualtrics";},5000)
    });  
    


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

  • IanJukes_1
    IanJukes_1 Wolverhampton Qubie ✭

    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

    Regards


    Ian

  • ahmedA
    ahmedA India Wizard ✭✭✭✭✭

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