When is the content of variables stored?

There are various applications of variables in Storyline. The content of variables is tracked within the e-learning module, but what happens when the learner closes the module?

We use variables to:

  • Customize content to make the learning experience more personalized.
  • Track progress.
  • Set conditions to skip or include parts of the lesson.
  • Record scores in gamification.

Where the content of variables is stored when a module is closed depends on how the module is published:

If the module is published as a SCORM package in a Learning Management System (LMS), then the content of the variables is recorded in the LMS. If the module is published on the internet, then the content is stored in a cookie on the learner’s computer.

The content of variables ultimately ends up in the LMS or a cookie. However, cookies have certain limitations because:

  • Many organizations block or restrict the use of cookies, which can affect the functionality of the module.
  • Cookies are stored on the learner’s computer, which can be inconvenient if the learner wants to continue their learning on a different computer.
Learning Management System (LMS)

In an LMS, the content of variables is stored properly. But when does this happen exactly?

  1. As soon as the content of a variable is changed?
  2. When leaving the slide where the variable is modified?
  3. When closing the module?
    1. In the proper way through the “Exit course” trigger.
    2. In the rough way by closing the window in which the module is displayed [x].


The SL manual doesn’t say much about this. So it’s time to do some research on my own. I have created an SL project with three screens:

  1. The first screen displays the current content of the variables. When you first start the module, you will see the content that you specified when defining the variable.
  2. In the second screen, you have the option to change the content of the variables. You will also see a button to proceed to the next screen, a button to revisit the current slide (Jump to this slide), and a button to exit the module using the Exit course trigger.
  3. In the third screen, the content of the variables is displayed again.

I have created a SCORM package of the entire project and published it on SCORM Cloud.

I opened the module each time from SCORM Cloud and then changed the variables on the second slide.

After that, I continued in different ways and then closed the module either by using the Exit course trigger or by closing the browser window.


De manier van afsluiten bleek geen invloed te hebben. Er was maar één factor die bepaalde of de inhoud werd opgeslagen:

The way of closing the module had no influence. There was only one factor that determined whether the content was saved:

Navigating to another slide in the project.

The content was not saved in the following cases:

  1. Closing directly from slide 2 using the Exit Course trigger.
  2. Closing directly from slide 2 by closing the browser window.
  3. Allowing slide 2 to call itself and then closing the module.

I also tested this for a modified variable on the last slide of a module, and the change was not saved when the module was closed. In a project consisting of only one slide, the content of variables is also not saved.


The content of variables is only saved when navigating to another slide.

  • If you want to ask learners questions at the end of a module, you should do so on the second-to-last slide of the module. Therefore, use the last slide only to adjust the status of the module and to allow the learner to close the module.
And the cookies?

I did check how this works when publishing for the Web: if the browser accepts cookies, the storage works the same way.


  sl-blog_2023-04-25_0940_Opslaan-variabelen.story (unknown, 164 hits)

  sl-blog_2023-04-25_0940_Opslaan-variabelen-scorm.zip (unknown, 134 hits)