Articulate Storyline is a software application that allows you to create interactive and engaging e-learning courses for various devices and platforms. It is part of the Articulate 360 suite, which includes other tools and resources for e-learning development. You can add animations, interactions, quizzes, simulations, and more to your courses, and publish them to HTML5, Flash, or SCORM formats. You can also use JavaScript to customize and extend the functionality of your courses.

JavaScript can enhance the capabilities of eLearning courses created in Articulate Storyline, regardless of the version used – Storyline 1, Storyline 2, or Storyline 360. By utilizing JavaScript, you can expand the functionality of Articulate Storyline tool beyond their default capabilities. We can update Storyline variables with JavaScript, but it can also be beneficial when preparing eLearning courses for integration with a Learning Management System (LMS).

Here are some examples of scenarios where incorporating JavaScript into Articulate Storyline can be beneficial:

  • Getting student’s name from LMS
  • Getting student’s status
  • Getting and setting Lesson status
  • Getting student’s Language preferences
  • Sending user score to LMS

How to Integrate JavaScript with Articulate Storyline?

We will now apply JavaScript to one of the scenarios mentioned earlier – Sending the learner’s score to the Learning Management System (LMS).

Let’s take a course developed in Articulate Storyline that includes questions or assessments. If you are using Storyline’s default assessment, some pre-defined variables will be added to calculate the score automatically.

However, Articulate Storyline does not allow access to these variables, so you cannot modify their values as Storyline takes full control over them.

To send a custom calculated score to the LMS, follow below steps:

Step 1:

Create a custom variable in Storyline

Step 2:

Adjust the Action Variable of a trigger to ‘Execute JavaScript’

Adjust Variable

Step 3:

Add the below JavaScript code in the ‘Script’ box, select when ‘Timeline starts’ on the Object ‘Results’ page and click OK to save the trigger to apply the code.

Trigger Wizard Storyline

Copy and paste the following JavaScript code in the ‘Script’ box

var player=GetPlayer();



Explanation of Code: How will the code use the SCORM API to communicate with the Learning Management System (LMS)?

GetPlayer() – This code returns an object that contains the methods and variable values of Articulate Storyline.

lmsAPI – The ‘API’ is an object from Storyline’s SCORM API that contains the necessary methods and values for establishing the connection and data flow from the course to the LMS.

SetScore(score, maxScore, minScore) – Set Score is a function inside lmsAPI object that sends the score to the LMS. It accepts 3 parameters “Score, Max Score and Minimum Score”.

commitData() – The lmsAPI object contains a function that saves all the data sent to the LMS in the database.

Step 4:

If you are using Articulate Storyline default assessment, it is important to set the Tracking Option to ‘Track using number of slides viewed’ rather than ‘Track using quiz results’. Otherwise, Storyline may override your custom score with its default result variable value.


Step 5: (Optional)

When the learner exits the course by clicking a button that has a trigger on it to exit the course, for Storyline 2 update 9 and below, it will still override the score to Zero even after setting the tracking option based on the slides viewed.

In such a case, we can use a workaround to exit the course without using the default trigger “Exit the course”.

You can add a trigger on the Exit button to Jump to the URL ‘./lms/goodbye.html’ when the learner clicks on it.



This is just one example of how JavaScript can be useful in Articulate Storyline courses. If you’re interested in learning more about integrating JavaScript with Storyline we invite you to check out our blog on the topic.

Articulate Storyline 360 – Free Training Tutorials

Swift ELearning Services provides a valuable opportunity for individuals who are enthusiastic about acquiring skills in the use of Articulate Storyline 360, a popular e-learning authoring tool. The company offers free tutorials that are designed to enhance the learning experience of users, making it easy for them to navigate the software and create high-quality e-learning content.

Articulate Storyline 360 is a powerful tool that enables users to create interactive and engaging e-learning courses. However, it can be challenging for beginners to master the various features and capabilities of the software. Swift ELearning Services recognized this challenge and created a solution by providing free tutorials that aim to simplify the learning process.

Through these free tutorials, individuals can access valuable resources that will help them understand the intricacies of Articulate Storyline 360. The tutorials cover a wide range of topics, including how to create animations, interactions, and assessments, among others. By following the step-by-step instructions, users can learn how to create compelling e-learning courses that meet their specific needs.

Please click on the below link to view our Articulate Storyline training videos.