| Reference | Downloads | Github

thisExp.addData not working for code component in Pavlovia



Dear all,

We are trying to save some variables (defined by us) to a personalized output file in the online version of Psychopy (Pavlovia).

In the offline version, we could simply use thisExp.addData() to achieve this. But when we put this in the corresponding JS block for the online Pavlovia version, it gives the error:

ReferenceError: thisExp is not defined

Could someone let us know if there’s an alternative way to save data in Pavlovia?



@katsuragiai, you would instead use:

psychoJS.experiment.addData('columnName', variable)