error exporting URL parameters


error exporting URL parameters

Author
Message
canlabstudies
canlabstudies
Associate Member
Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)

Group: Forum Members
Posts: 15, Visits: 115
So we've run a couple studies and are running into an issue where inquisit will variably have trouble exporting url parameters from within the script. Both studies use Amazon's Mturk and redirects participants to the inquisit study. In the first study, we redirect participants to the default finish page and have it display their subject ids as confirmation codes. For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half, however, they all receive this string: "%3C%25script.subjectid%25%3E".  

In the second study, instead of using the default finish page, we redirect to a short qualtrics survey, and export multiple url parameters.
(e.g. redirecting to http://rotman.az1.qualtrics.com/jfe/form/XXX?mturkcode=<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.

Again, for half the participants, this works and all values are exported correctly. But for the other half these come out as:
mturkcode = "%3C%values.mc%%3E"
subjectid = "%3C%script.subjectid%%3E,X" (where X is the participant's actual subjectid.)
groupid = "%3C%script.groupid%%3E"

Note that by far the most interesting of these is the subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X").

Both scripts work fine offline, and different versions of both were used on mturk online earlier this year and did not show any of these issues. This appears to indicate that a recent update may have effected how inquisit exports such parameters? If you have any advice it would be much appreciated!

Cheers!


Dave
Dave
Supreme Being
Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)

Group: Administrators
Posts: 8.8K, Visits: 37K
canlabstudies - Thursday, May 17, 2018
So we've run a couple studies and are running into an issue where inquisit will variably have trouble exporting url parameters from within the script. Both studies use Amazon's Mturk and redirects participants to the inquisit study. In the first study, we redirect participants to the default finish page and have it display their subject ids as confirmation codes. For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half, however, they all receive this string: "%3C%25script.subjectid%25%3E".  

In the second study, instead of using the default finish page, we redirect to a short qualtrics survey, and export multiple url parameters.
(e.g. redirecting to http://rotman.az1.qualtrics.com/jfe/form/XXX?mturkcode=<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.

Again, for half the participants, this works and all values are exported correctly. But for the other half these come out as:
mturkcode = "%3C%values.mc%%3E"
subjectid = "%3C%script.subjectid%%3E,X" (where X is the participant's actual subjectid.)
groupid = "%3C%script.groupid%%3E"

Note that by far the most interesting of these is the subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X").

Both scripts work fine offline, and different versions of both were used on mturk online earlier this year and did not show any of these issues. This appears to indicate that a recent update may have effected how inquisit exports such parameters? If you have any advice it would be much appreciated!

Cheers!


Not sure what's causing this ("For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half [it doesn't work]" is especially odd), but I can certainly think of a workaround for the confirmation code case. The trick would be to set the finish URL directly in the script, i.e.:

#1: Add a <text> element specifying the finish page to the script like so

<text finishpage>
/ items = ("https://www.millisecond.com/web/finish5.aspx?IQConfirmationCode=<%script.subjectid%>")
</text>

#2: Set the defaults.finishpage property /onexptbegin:

<expt>
/ onexptbegin = [
    defaults.finishpage = text.finishpage.item.1;
]
...
</expt>

I don't quite understand the 2nd case you described, especially this part:

"subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X")."

What I can't glean from your description is where the two instances of the subject id come from in the first place. Would you be able to shed some additional light on that, please?

Dave
Dave
Supreme Being
Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)

Group: Administrators
Posts: 8.8K, Visits: 37K
Dave - Thursday, May 17, 2018
canlabstudies - Thursday, May 17, 2018
So we've run a couple studies and are running into an issue where inquisit will variably have trouble exporting url parameters from within the script. Both studies use Amazon's Mturk and redirects participants to the inquisit study. In the first study, we redirect participants to the default finish page and have it display their subject ids as confirmation codes. For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half, however, they all receive this string: "%3C%25script.subjectid%25%3E".  

In the second study, instead of using the default finish page, we redirect to a short qualtrics survey, and export multiple url parameters.
(e.g. redirecting to http://rotman.az1.qualtrics.com/jfe/form/XXX?mturkcode=<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.

Again, for half the participants, this works and all values are exported correctly. But for the other half these come out as:
mturkcode = "%3C%values.mc%%3E"
subjectid = "%3C%script.subjectid%%3E,X" (where X is the participant's actual subjectid.)
groupid = "%3C%script.groupid%%3E"

Note that by far the most interesting of these is the subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X").

Both scripts work fine offline, and different versions of both were used on mturk online earlier this year and did not show any of these issues. This appears to indicate that a recent update may have effected how inquisit exports such parameters? If you have any advice it would be much appreciated!

Cheers!


Not sure what's causing this ("For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half [it doesn't work]" is especially odd), but I can certainly think of a workaround for the confirmation code case. The trick would be to set the finish URL directly in the script, i.e.:

#1: Add a <text> element specifying the finish page to the script like so

<text finishpage>
/ items = ("https://www.millisecond.com/web/finish5.aspx?IQConfirmationCode=<%script.subjectid%>")
</text>

#2: Set the defaults.finishpage property /onexptbegin:

<expt>
/ onexptbegin = [
    defaults.finishpage = text.finishpage.item.1;
]
...
</expt>

I don't quite understand the 2nd case you described, especially this part:

"subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X")."

What I can't glean from your description is where the two instances of the subject id come from in the first place. Would you be able to shed some additional light on that, please?

Come to think of it, though, as an immediate fix, the same workaround should work for the 2nd case, too. I.e. if you specify

<text finishpage>
/ items = ("http://rotman.az1.qualtrics.com/jfe/form/XXX?mturkcode=<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>")
</text>

with

<expt>
/ onexptend = [
    defaults.finishpage = text.finishpage.item.1;
]
...
</expt>

in that script, the various query parameters _should_ be populated correctly for all participants and included in the redirection to Qualtrics.

canlabstudies
canlabstudies
Associate Member
Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)

Group: Forum Members
Posts: 15, Visits: 115
Dave - Thursday, May 17, 2018
Dave - Thursday, May 17, 2018
canlabstudies - Thursday, May 17, 2018
So we've run a couple studies and are running into an issue where inquisit will variably have trouble exporting url parameters from within the script. Both studies use Amazon's Mturk and redirects participants to the inquisit study. In the first study, we redirect participants to the default finish page and have it display their subject ids as confirmation codes. For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half, however, they all receive this string: "%3C%25script.subjectid%25%3E".  

In the second study, instead of using the default finish page, we redirect to a short qualtrics survey, and export multiple url parameters.
(e.g. redirecting to http://rotman.az1.qualtrics.com/jfe/form/XXX?mturkcode=<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.

Again, for half the participants, this works and all values are exported correctly. But for the other half these come out as:
mturkcode = "%3C%values.mc%%3E"
subjectid = "%3C%script.subjectid%%3E,X" (where X is the participant's actual subjectid.)
groupid = "%3C%script.groupid%%3E"

Note that by far the most interesting of these is the subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X").

Both scripts work fine offline, and different versions of both were used on mturk online earlier this year and did not show any of these issues. This appears to indicate that a recent update may have effected how inquisit exports such parameters? If you have any advice it would be much appreciated!

Cheers!


Not sure what's causing this ("For half the participants, this works it and it outputs their randomized confirmation code correctly. For the other half [it doesn't work]" is especially odd), but I can certainly think of a workaround for the confirmation code case. The trick would be to set the finish URL directly in the script, i.e.:

#1: Add a <text> element specifying the finish page to the script like so

<text finishpage>
/ items = ("https://www.millisecond.com/web/finish5.aspx?IQConfirmationCode=<%script.subjectid%>")
</text>

#2: Set the defaults.finishpage property /onexptbegin:

<expt>
/ onexptbegin = [
    defaults.finishpage = text.finishpage.item.1;
]
...
</expt>

I don't quite understand the 2nd case you described, especially this part:

"subjectid, which always records the incorrect placeholder first, and the correct id second. Normally it records the participants correct subjectid twice (so it would be  "X,X")."

What I can't glean from your description is where the two instances of the subject id come from in the first place. Would you be able to shed some additional light on that, please?

Come to think of it, though, as an immediate fix, the same workaround should work for the 2nd case, too. I.e. if you specify

<text finishpage>
/ items = ("http://rotman.az1.qualtrics.com/jfe/form/XXX?mturkcode=<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>")
</text>

with

<expt>
/ onexptend = [
    defaults.finishpage = text.finishpage.item.1;
]
...
</expt>

in that script, the various query parameters _should_ be populated correctly for all participants and included in the redirection to Qualtrics.

Thanks for your advice! I'm just getting to this now, and will try your workaround and get back to you. The answer to your question is that I'm not sure. My guess is that this is a quirk with how Qualtrics records imported string parameters as opposed to numeric parameters. Note that both the compensation code and the groupid are numeric. So i think the subjectid, being the only string parameter, gets recorded twice.

So basically, we import into inquisit the participant's Mturkid as their subjectid (e.g. X6789). This works fine. Then we export this same id from inquisit into qualtrics. When this happens, qualtrics usually will record it twice, probably because its a string (so X6789,X6789). However the other parameters we export only get recorded once, probably because they are numeric, (e.g. mturkcode = 7987986, groupid = 25). But, with this new error, subjectid instead records it as i stated above, so (%3C%script.subjectid%%3E,X6789), the others, perhaps because they are only being recorded once, are exported as ("%3C%values.mturkcode%%3E, and "%3C%script.groupid%%3E"). Why this occurs is probably even more confusing to me as it is to you. 
canlabstudies
canlabstudies
Associate Member
Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)

Group: Forum Members
Posts: 15, Visits: 115
Alright. I spent some time some time playing with getting the second study working. It looks your solution works for subjectid, but not for groupid or other values. I added the following code to my experiment:

<text finishpage>
/ items = ("http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>")
</text>

<expt>
/ blocks = [1=ArcheStereotypeSelect; 2=Consent; 3=Instructions; 4=ArcheStereotype]
/ onexptend = [
values.completed=1; values.mc = rand(10000,99999)
]
/ onexptend = [
  defaults.finishpage = text.finishpage.item.1;
]

</expt>

Then I set the online study to redirect to an external website (If i tell it to redirect to the default webpage, it will do that instead of redirecting me to qualtrics). I used the URL "http://rotman.az1.qualtrics.com/jfe/form/XXX" (it won't work if i don't have this base URL right. For example if i redirect to "http://rotman.az1.qualtrics.com," no dice.). It will redirect me to:

         http://rotman.az1.qualtrics.com/jfe/form/XXX?subjectid=<%script.subjectid%>,

but not:

         http://rotman.az1.qualtrics.com/jfe/form/XXX?<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.

Playing with this some more, it looks like if i redirect to:

         http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>

I can get the subjectid to be exported correctly, since the script will insert this value into the url, such that it reads:

          http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>&subjectid=<%script.subjectid%>

But since it does nothing with the other values, it seems i can't do anything with those. Any tips? Let me know if you would like more information (the full script, etc). 


Dave
Dave
Supreme Being
Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)Supreme Being (395K reputation)

Group: Administrators
Posts: 8.8K, Visits: 37K
canlabstudies - Friday, May 18, 2018
Alright. I spent some time some time playing with getting the second study working. It looks your solution works for subjectid, but not for groupid or other values. I added the following code to my experiment:

<text finishpage>
/ items = ("http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>")
</text>

<expt>
/ blocks = [1=ArcheStereotypeSelect; 2=Consent; 3=Instructions; 4=ArcheStereotype]
/ onexptend = [
values.completed=1; values.mc = rand(10000,99999)
]
/ onexptend = [
  defaults.finishpage = text.finishpage.item.1;
]

</expt>

Then I set the online study to redirect to an external website (If i tell it to redirect to the default webpage, it will do that instead of redirecting me to qualtrics). I used the URL "http://rotman.az1.qualtrics.com/jfe/form/XXX" (it won't work if i don't have this base URL right. For example if i redirect to "http://rotman.az1.qualtrics.com," no dice.). It will redirect me to:

         http://rotman.az1.qualtrics.com/jfe/form/XXX?subjectid=<%script.subjectid%>,

but not:

         http://rotman.az1.qualtrics.com/jfe/form/XXX?<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.">http://rotman.az1.qualtrics.com/jfe/form/XXX?<%values.mturkcode%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>.

Playing with this some more, it looks like if i redirect to:

         http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>

I can get the subjectid to be exported correctly, since the script will insert this value into the url, such that it reads:

          http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>&subjectid=<%script.subjectid%>

But since it does nothing with the other values, it seems i can't do anything with those. Any tips? Let me know if you would like more information (the full script, etc). 


To be clear: Setting the finish URL in the script per

/ onexptend = [
  defaults.finishpage = text.finishpage.item.1;
]

will override anything you specified as URL to redirect to in the web experiment settings (outside of the script), i.e. it should not matter what -- if anything -- you specified there.

In this particular case, since you only set defaults.finishpage /onexptend, you need to complete the full thing for this to take effect. If you exit the experiment prematurely (e.g. by pressing CTRL+Q), the change may not be processed.

Also, as in the previous response, the URL specified in your <text> element ought to include all parameters you wish to process and push forward, including subjectid, i.e. it should read

<text finishpage>
/ items = ("http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&subjectid=<%script.subjectid%>&groupid=<%script.groupid%>")
</text>


not just mc and groupid

<text finishpage>
/ items = ("http://rotman.az1.qualtrics.com/jfe/form/XXX?mc=<%values.mc%>&groupid=<%script.groupid%>")
</text>


I've set up an analogous script for you to try out here:

https://mili2nd.co/2lib?subjectid=1

When you run this, you should end up being redirected to a URL that looks like this in your address bar:

https://rotman.az1.qualtrics.com/jfe/form/XXX?mc=53905.08&subjectid=1&groupid=317771090

canlabstudies
canlabstudies
Associate Member
Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)Associate Member (188 reputation)

Group: Forum Members
Posts: 15, Visits: 115
Ah, thanks for the info. I got it to run by setting default page using the default values we desire at the beginning of the study, then updating it again at the study end.

And your right about needing all the parameters. I actually had them all in the actual script, but accidentally deleted subjectid when i was amending my link for security purposes. Good catch, though. 

 I'll get back to you if, when we run actually participants, this problem comes up again. But for now it looks like the workout works! Thanks a bunch. 
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search