Configuring turkgate - gideongoldin/TurkGate GitHub Wiki

TurkGate does not require any configuration. However, for those interesting in non-default features, users can modify the TurkGate configuration file config.php.

Including Worker ID in the Survey URL

NOTE: This feature will only work with versions of TurkGate beyond 0.4.0, or with the current state of the repository (https://github.com/gideongoldin/TurkGate/archive/master.zip).

Workers who accept a HIT are taken to the TurkGate gateway page. If the worker is eligible, the page will display a link to the survey. By default, this link does not contain the worker's ID. However, users can change this behavior, such that the survey URL does contain the worker ID.

To do this, you will need to modify the config.php file. Open the file, and add the following line to the list of definitions:

define('SEND_ID_TO_SURVEY', TRUE);

Save the file on the server. Your file should now look something like:

<?php
    define('DATABASE_HOST', 'localhost');
    define('DATABASE_NAME', 'TurkGate');
    define('DATABASE_USERNAME', 'username');
    define('DATABASE_PASSWORD', 'password');
    define('BASE_URL', 'http://yourserver.edu/TurkGate/TurkGate/');
    define('KEY', '0a17790d84e9201g47ed7aad7f3bce244a9c7557');
    define('SEND_ID_TO_SURVEY', TRUE);
?>

and worker ID will be present in the survey URL. For users who desire this functionality, this line of code will need to be added to the configuration file after each (re)installation of TurkGate.