JavasScript library

The JavaScript library provides a function to submit the data to the proliferate server at the end of an experiment.

Loading the library

Add the following <script> tag within the <head> tag of your experiment HTML file to load the proliferate library:

<script src="" type="text/javascript"></script>


This library requires the jQuery library. If you are already using jQuery in your experiment, make sure to include the above <script> tag after loading jQuery. If you are not using jQuery, add the following <script> tag before loading the proliferate library:

<script src=""></script>

Submitting data

To submit data at the end of the experiment, use the proliferate.submit function:

proliferate.submit(data[, success_fct][, failure_fct])
  • data – A JavaScript object containing all the data that needs to be submitted. See Data processing for details on how this object is stored and converted into CSV files when dowloading the data from proliferate.
  • success_fct – An optional function with one argument that gets called if sending the data to the server succeeds. If not specified, participants will be automatically redirected to the Prolific completion URL after the data has been uploaded.
  • failure_fct – An optional function with one argument that gets called if sending the data to the server fails. If not specified, participants receive an error message asking them to message the researcher to get compensated.

If you have an HTML tag with the id thanks in your experiment, the default success and failure functions will keep participants updated on the status of the upload.

Experiment integration

Where exactly in your code you want to call this function depends on the implementation of your experiment. Here are two examples on how to setup the data submission.

If you are using the Stanford experiment templates replace the following line

setTimeout(function() {turk.submit(;}, 1000);



If you are using version 7 of jsPsych set the on_finish property of initJsPsych() to a function that calls proliferate.submit:

If you are using version 6 or earlier, set the on_finish property in the init() call to a function that calls proliferate.submit:

  timeline: exp,
  on_finish: function(data) {
    proliferate.submit({"trials": data.values()});