Not so long ago we’ve added ‘custom variables’ to our tests. We store every variable you specify in the URL of your test and include these variables and an unique participant id (pid) in your redirect URL. That might sound a bit complicated, but enables you to store additional data for individual participants in Usabilla and to pass through data to other services as well. Let me try to explain with a simple example using a web form to submit data to a Usabilla test:
A simple web form
You can submit a simple web form to a Usabilla test. If you use ‘GET’ as method, the fields in your form are submitted as URL encoded variables. Example:
<form method="get" id="screener" name="screener" action="http://usabilla.com/rate/15927259904cb5afe7f3c00"> <label for="name">Name:</label> <input id="name" name="name" type="text" /> <label for="group">Group:</label> <select id="group" name="group"> <option value="A">A</option> <option value="B">B</option> </select> <input type="submit" value="Submit" /> </form>
This example form submits two variables (name and group) to a Usabilla test. The form input is stored together with the test data of your participant. At the end of the test the variables will also be attached to the redirect URL. This redirect URL could be another survey as well: read about combining Usabilla with a PollDaddy survey.
Accessing custom variables
Unfortunately we don’t support custom variables in our visual analysis yet. We got plans for a major overhaul of our analysis and will definitely include filters for individual participants and custom variables in a new version. In the meanwhile you can access your custom variables in our XML exports. We store the custom variables per participant in the results XML file as ‘context’:
<participant id="28731" created_on="2010-10-25 17:01:08"> <test id="6319" time="3640"> <context> <location/> <user> <name><![CDATA[Paul Veugen]]></name> <group><![CDATA[B]]></group> </user> </context> <pages count="1"> <page id="8740" time="3640"> <tasks count="1"> <task id="82086" time="3640"> <points count="1"> <point id="464196" number="1" x="831" y="860"/> </points> <notes count="0"/> </task> </tasks> </page> </pages> </test> </participant>
You can read the raw XML in a text editor or import your results in other software. Google Spreadsheets offers great support for XML imports. I quickly made a simple example spreadsheet for the above form: sample spreadsheet that imports custom vars. If you log in to your Google Account you can create a copy of this spreadsheet and adapt it to your own needs. In this blog post you’ll read more about importing Usabilla data in Google Spreadsheets.
Feel free to contact us if you need any help with these advanced features. We’d be happy to help you to set up a test, export your results, or combine Usabilla with other tools.