Passing URL parameters - campsych/concerto-platform GitHub Wiki
Concerto can accept URL parameters. This can be extremely useful if you want to pass data into Concerto from another source. For example, you might send 1,000 people an email with a Concerto test URL and want each person to be identifiable from a unique ID.
e.g. http://www.concertotest.com/test/mytest?id=12345
On the test creation page, there's an expandable section called Test input. Click it to expand it.
Now if you Add input parameter you can specify to Concerto that you're expecting a parameter. Give the parameter a name (in my case I called it id), and a description to help you remember what to expect. Then, critically, at the bottom remember to click on the checkbox labeled URL to allow the parameter to be passed from the URL.
Once you save the changes, you'll notice that the test start node now has a new output called id. You can now use this variable in Concerto.
If you want to save the variable, you'll need to set up the flow chart like this:
However, because the save data node expects a List R object, and the URL parameter is a character string, you'll need to convert the character string to a list by clicking on the highlighted button above and then entering the following code:
list(id=id)
Note that you need to replace id with the name of your URL variable.
This will take the id character string and convert it to an R list object which is then put into the database by the save data node.
What if the above is not working for creating Session ID?
In some older versions of Concerto 5, the start session node is required to create the session ID. Simply create the start session node and for 'Authorization type' choose 'None chosen' from the drop-down box. Participants will not be required to login or register, but the node will create a 'session' output that you can pass to your save data node, for example. This 'session' output will act as a URL parameter and create a unique session ID to track your respondents by.