How to specify a requestor identifier in a HIT mechanical horizontal bar?

I want to create a mturk HIT that has a URL like this:
www.example.com?source=worker_id
where worker_id is the identifier of the working code. I am initially going to create them from the mturk web interface, then as soon as I get it right, with PHP. But I can’t figure out how to get the employee ID from the modified mturk HIT HTML syntax.

+6
amazon-web-services mechanicalturk
source share
2 answers

Mechanical Turk will display your site with a URL that looks like this:

www.example.com/?hitId=2384239&assignmentId=ASD98ASDFADJKH&workerId=ASDFASD8

On your php page located in this place, you can access workId (as well as other identifiers) as follows:

<?php $hitId = $_REQUEST["hitId"]; $assignmentId = $_REQUEST["assignmentId"]; $workerId = $_REQUEST["workerId"]; echo "Hit ID: $hitId\n"; echo "Ass ID: $assignmentId\n"; echo "Worker ID: $workerId\n"; ?> 
+10
source share

Note that workerId is NOT dispatched during the preview, only after accepting the HIT. If you use an external HIT, you can create a cookie to see if it was an employee who took a previous hit, but of course this method is not reliable.

+2
source share

All Articles