Itamar,
Recall that you can easily extract GET parameters using JavaScript:
https://stackoverflow.com/a/5448595
So, in the worst case, you "just" need to put another oTree experiment before the actual experiment; the first "experiment" then extracts the relevant parameters using JavaScript and redirects to the actual experiment, perhaps using a different and more convenient parameterization.
Best,
Max
25 Aug 2021 13:30:50 Itamar Bellaiche <
itamar.b...@mail.huji.ac.il>:
> Hi and thank you,
>
> Chris, you are right about the .asp, it was just an example.
>
> But the issue is this:
>
> When initializing a participant by
http://localhost:8000/join/damuzete/?participant_label=.whatever&extratext, only the "whatever" part is recorded as the participant label, meaning participant.label = whatever.
> Is there any way to record the whole expression, including the ampersand (&) and what comes after it ("extratext" in my example), as the participant label?
> Meaning I would like it to record as: participant.label = whatever&extratext.
>
> Thank you very much,
>
> Itamar
>
> On Wed, Aug 25, 2021 at 1:56 PM Chris @ oTree <
ch...@otree.org> wrote:
>> Anyway, it seems the efficient solution would be for the other platform to let you configure the name of the URL parameters, so that instead of "id" you can call it "participant_label". Because oTree doesn't recognize URL parameters called "id" or "session" and in the future they may be reserved for other things.
>>
>> On Wednesday, August 25, 2021 at 4:52:31 AM UTC-6 Chris @ oTree wrote:
>>> I doubt that platform wants to put .aspx at the end of your URLs. That doesn't make sense. They were probably using that as an example since it's a common ending for URLs, just like .php.
>>> But oTree URLs don't end in .aspx.
>>>
>>> On Wednesday, August 25, 2021 at 4:29:08 AM UTC-6
itamar.b...@mail.huji.ac.il wrote:
>>>> Hi everyone,
>>>>
>>>> Firstly, I want to thank Holger for his answer! So thank you Holger.
>>>>
>>>> Now what Holger proposed works fine, unless I have an extra "&" in the variable I need to record.
>>>>
>>>> In fact, I need to record variables like: *.aspx?id=XXX&session=YYY*.
>>>> What can I do in order to get the whole expression _.aspx?id=XXX&session=YYY_ ?
>>>>
>>>> Thank you very much!
>>>>
>>>> Itamar
>>>>
>>>>
>>>>
>>>> On Mon, Aug 16, 2021 at 7:43 PM BonnEconLab <
bonne...@uni-bonn.de> wrote:
>>>>> Hi,
>>>>>
>>>>> Maybe I’m naïve, but shouldn’t the following work in your situation?
>>>>>
>>>>> When I set up a room in oTree without explicit participant labels provided in a /.txt/ file, I can record the required extension “.aspx?id=XXX” as a participant label. Here is an example using oTree’s “built-in” “Room for live demo (no participant labels)”: Setting up this room yields a (demo) URL
>>>>>> …
>>>>> To view this discussion on the web, visit
https://groups.google.com/d/msgid/otree/80e7267f-f3b8-45cc-b7a8-0245cd851f15n%40googlegroups.com[https://groups.google.com/d/msgid/otree/80e7267f-f3b8-45cc-b7a8-0245cd851f15n%40googlegroups.com?utm_medium=email&utm_source=footer].
>> To view this discussion on the web, visit
https://groups.google.com/d/msgid/otree/1d2e9294-5d9b-44d9-907d-6479751db5d5n%40googlegroups.com[https://groups.google.com/d/msgid/otree/1d2e9294-5d9b-44d9-907d-6479751db5d5n%40googlegroups.com?utm_medium=email&utm_source=footer].
> --
> You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
otree+un...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/otree/CAOJj8PcUgqCuy92Uy8xHBUEdTTjruEi%3D3GFSXgWYAGvoq7d2oQ%40mail.gmail.com[https://groups.google.com/d/msgid/otree/CAOJj8PcUgqCuy92Uy8xHBUEdTTjruEi%3D3GFSXgWYAGvoq7d2oQ%40mail.gmail.com?utm_medium=email&utm_source=footer].