# No files being saved to pavlovia

**URL:** <https://discourse.psychopy.org/t/no-files-being-saved-to-pavlovia/42940>\
**Category:** jsPsych\
**Created:** [November 15, 2024, 1:25pm UTC](https://discourse.psychopy.org/t/no-files-being-saved-to-pavlovia/42940 "2024-11-15T13:25:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jonathan.kominsky](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jonathan.kominsky](https://discourse.psychopy.org/u/jonathan.kominsky)\
**Post date:** [November 26, 2024, 10:56am UTC](https://discourse.psychopy.org/t/no-files-being-saved-to-pavlovia/42940/4 "2024-11-26T10:56:08Z")

</div>

Indeed, the version I linked is out of date and the documentation is too. Here is the code I use in a project I have just launched, which I have tested and confirmed that it does save data to the server:

First, the plugin import:

```auto
<script src="lib/vendors/jspsych-7.1.2/jspsych.js"></script>
<script type="text/javascript" src="lib/jspsych-7-pavlovia-2022.1.1.js"></script>

```

Then there are **two** jsPsychPavlovia timeline elements, and they are the **first and last things in the timeline** :

```auto
// First element in timeline
  /* init connection with pavlovia.org */
  var pavlovia_init = {
      type: jsPsychPavlovia,
      command: "init"
  };
  timeline.push(pavlovia_init);

```

```auto
//Last element in timeline
  /* finish connection with pavlovia.org */
  var pavlovia_finish = {
      type: jsPsychPavlovia,
      command: "finish"
      };
  timeline.push(pavlovia_finish);

```

I also figured out how to do a redirect from the end of the experiment to prolific by adding an “on\_finish” trigger to the second one: [How to redirect to Prolific after completing a jsPsych experiment on Pavlovia](https://discourse.psychopy.org/t/how-to-redirect-to-prolific-after-completing-a-jspsych-experiment-on-pavlovia/43063/1)

---

_[View the full topic](https://discourse.psychopy.org/t/no-files-being-saved-to-pavlovia/42940)._
