different URL for participants who completed the experiment


Author
Message
Ine Van der Cruyssen
Ine Van der Cruyssen
Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)
Group: Forum Members
Posts: 9, Visits: 75
Dave - 10/6/2022
Ine Van der Cruyssen - 10/6/2022
Hi,

In my experiment, I would like to redirect participants who completed the experiment to a different URL than participants who didn't complete the experiment or who pressed ctrl + Q.
I understand that I can redirect participants who completed the experiment by setting the defaults.finishpage property in the script /onexptend 
But I'm not sure about the others who didn't complete the experiment...
Now I tried to set the finish page URL on millisecond.com to the URL for participants who didn't complete the experiment,
and hoped that changing the defaults.finishpage for participants who did complete the experiment would overwrite this, but this didn't happen
How could I change this and what URL should I enter on the finish page?
(here:
)
Thank you in advance!
Ine

This can't work, to a large extent because <%userID%> and <%surveyID%> are not Inquisit variables and the script does not know anything about them. I assume you're passing  URL parameters called userID and surveyID to the launch page from whatever panel or survey platform start out at. The launch page will automatically cache those URL parameters and automatically append them to the redirection URL you specify in the web settings. The script, however, does not learn about these URL parameters (or, in your case, it only learns about the value of userID, because you pass that in as subjectid to be used by the script, so it's available as script.subjectid; https://www.millisecond.com/support/docs/current/html/language/properties/subjectid.htm ). You can't do



<%userID%> and <%surveyID%> mean absolutely nothing to the script.

What you'll want to do is:
(1) Create a new value in the script called status:

<values>
/ status = "filterout"

/Practice1Counter = 0
/Practice2Counter = 0
/Practice3Counter = 0

/trialCounter = 0

/word = ""
/itemnumber = ""
/iti = ""

/RESP = ""
/NR_targets = 0
/NR_probes = 0
/NR_controls = 0
</values>

(2) Set the value to "finish" in the final trial of the script:

<trial finish>
/ ontrialbegin = [
    values.status = "finish";
]

/ inputdevice = keyboard
/ stimulusframes = [1 = finish, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

(3) Get rid of the /onexptend logic to set defaults.finishpage.

(4) Specify

http://www.panel4all.co.il/survey_runtime/external_survey_status.php?status=<%values.status%>

as the URL to redirect to in the web settings.



Amazing! Thank you so much!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Ine Van der Cruyssen - 10/6/2022
Hi,

In my experiment, I would like to redirect participants who completed the experiment to a different URL than participants who didn't complete the experiment or who pressed ctrl + Q.
I understand that I can redirect participants who completed the experiment by setting the defaults.finishpage property in the script /onexptend 
But I'm not sure about the others who didn't complete the experiment...
Now I tried to set the finish page URL on millisecond.com to the URL for participants who didn't complete the experiment,
and hoped that changing the defaults.finishpage for participants who did complete the experiment would overwrite this, but this didn't happen
How could I change this and what URL should I enter on the finish page?
(here:
)
Thank you in advance!
Ine

This can't work, to a large extent because <%userID%> and <%surveyID%> are not Inquisit variables and the script does not know anything about them. I assume you're passing  URL parameters called userID and surveyID to the launch page from whatever panel or survey platform start out at. The launch page will automatically cache those URL parameters and automatically append them to the redirection URL you specify in the web settings. The script, however, does not learn about these URL parameters (or, in your case, it only learns about the value of userID, because you pass that in as subjectid to be used by the script, so it's available as script.subjectid; https://www.millisecond.com/support/docs/current/html/language/properties/subjectid.htm ). You can't do



<%userID%> and <%surveyID%> mean absolutely nothing to the script.

What you'll want to do is:
(1) Create a new value in the script called status:

<values>
/ status = "filterout"

/Practice1Counter = 0
/Practice2Counter = 0
/Practice3Counter = 0

/trialCounter = 0

/word = ""
/itemnumber = ""
/iti = ""

/RESP = ""
/NR_targets = 0
/NR_probes = 0
/NR_controls = 0
</values>

(2) Set the value to "finish" in the final trial of the script:

<trial finish>
/ ontrialbegin = [
    values.status = "finish";
]

/ inputdevice = keyboard
/ stimulusframes = [1 = finish, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

(3) Get rid of the /onexptend logic to set defaults.finishpage.

(4) Specify

http://www.panel4all.co.il/survey_runtime/external_survey_status.php?status=<%values.status%>

as the URL to redirect to in the web settings.



Attachments
expnathalie_nks.rev.iqx (253 views, 157.00 KB)
Ine Van der Cruyssen
Ine Van der Cruyssen
Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)Associate Member (103 reputation)
Group: Forum Members
Posts: 9, Visits: 75
Hi,

In my experiment, I would like to redirect participants who completed the experiment to a different URL than participants who didn't complete the experiment or who pressed ctrl + Q.
I understand that I can redirect participants who completed the experiment by setting the defaults.finishpage property in the script /onexptend 
But I'm not sure about the others who didn't complete the experiment...
Now I tried to set the finish page URL on millisecond.com to the URL for participants who didn't complete the experiment,
and hoped that changing the defaults.finishpage for participants who did complete the experiment would overwrite this, but this didn't happen
How could I change this and what URL should I enter on the finish page?
(here:
)
Thank you in advance!
Ine
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search