How To Connect Google Analytics With Articulate Storyline

Last updated:

IIn this video i’ll show you step by step how you can add Google Analytics code to your Articulate Storyline project so you can create learning report about your e-learning course without Needing an LMS.

cta under video

You can use Google Analytics to track data from your Articulate Storyline course. There’s only one drawback. The data in Google Analytics is anonymous. So you can’t see data for a specific but you can see overall data from your module. And you can track pretty cool stuff that goes beyond standard SCORM data. Let’s look what you can track in your Storyline course.

The first thing that you can track is which slides of your course are viewed. If your course is not linear this can give you a good insight which path the biggest part of your users take.

But you can track more.

  • For instance when you have extra information layers in your course you can track whether they are actually viewed.
  • When a video starts or a video completed. This way you can track if users watch you whole video
  • If users answered questions correctly or incorrect.
  • If users actually complete your course

and much more you can come up with, because you can define the statements yourself in your .story file.

Track Storyline statements in Google Analytics

Now let’s see how you can create these statement in your own Storyline course.

Let’s start with tracking which slides a user visited.

Tracking Storyline Slide names in Google Analytics:
Create a variable called PageTitle.

Now create a trigger that places the value of the Storyline variable Menu.SlideTitle in the PageTitle variable.

Create an execute javascript trigger when timeline starte with the following javascript code:

//Get Var Pagetitle from Storyline
var player = GetPlayer();
var pagetitle = player.GetVar(“PageTitle”);

//Send PageTitle to Analytics
ga(‘send’, ‘screenview’, {screenName: pagetitle});

The first 3 lines are to connect Javascript with Storyline and to retrieve the contents of the Storyline variable PageTitle and place it in the javascript variable pagetitle.

The line ga(‘send’, ‘screenview’, {screenName: pagetitle}); is to send the javascript variable pagetitle (where we stored the current storyline slidetitle) to Google Analytics as screenview. Later on this video I’ll show you where you can find the screenview report in Google Analytics.

Tracking Storyline clicks in Google Analytics:
To track the click of a button you can use the following line of code:
ga(‘send’, ‘event’, ‘Button’, ‘click’, ‘Test Button’);’

Events in Google Analytics are user interactions. You can define these user interactions yourself

Tracking Storyline video in Google Analytics:
ga(‘send’, ‘event’, ‘Videos’, ‘play’, ‘[video_naam]’);
ga(‘send’, ‘event’, ‘video’, ‘100% video played’, ‘[video_naam]’);

Tracking Questions in Google Analytics:
ga(‘send’, ‘event’, ‘Question’, ‘correct’, ‘Question 1’);

Tracking Completion status in Google Analytics:
ga(‘send’, ‘event’, ‘Result’, ‘completed’);

Create a Google Analytics Account

  1. If you’re ready with this, the next step is to create a new Google Analytics account. Go to
  2. If you already have a Google Analytics account you can logon to the account and click on ‘Admin’ in the Lower left corner of your screen.
  3. In the “Property” column, click “New Property.”
  4. Choose Web for ‘What do you want to measure?’ for ‘What do you want to measure?’ And at the bottom of the screen, click ‘Continue’.
  • Choose a website name. (e.g. the name of Storyline course)
  • Enter the website url where the e-learning will be located. For example,
  • Choose an industry and choose a Time reporting zone.

Now click on ‘Create’.

Copy the tracking ID now. You’ll need this later on.

Now, at the top of the screen, click “Admin.”

On the next screen, click Create View.

Choose ‘mobile app’, enter a reporting view name and choose a ‘Reporting Time Zone’, and then click ‘Create View’.

Publish your Storyline course

Now you can publish your Articulate Storyline course to HTML and add the Google Analytics tracking code to story.html.

Go to the folder where the published files are and open story.html in notepad++, sublimetext, or notepad.

Add the code below above the </head>tag. Please note that your own Analytics ID still needs to be filled in in this code.

<script>||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga(‘create’, ‘UA-XXXXXXXX-X’, ‘auto’);
ga(‘set’, ‘appName’, ‘STORYLINE_COURSE_NAME’);
<script async src=””></script>

Now you can upload the files to an ftp server for instance.

Testing Storyline tracking in Google Analytics

If you want to check is the Google Analytics code works you can open your browser and navigate go to the url where the storyline module is located.

Such as.

Now Open Google Analytics and on the left click on Realtime > Overview. If you see one active user on the app here now, you know that the code works. you are that one active user yourself.

if you go trough your e-learning course you can check in Google Analytics under Realtime > Events if the events that you’ve setup in your Storyline module also work.

You've just read an article from Upward Online Learning

Want to read more articles like this? Sign up for my weekly emails. As a bonus, you'll receive my ebook with my 7 top Articulate Storyline time-saving tips for a perfect start to learning Storyline faster and without any hassle!

Want to know more about creating more effective and engaging e-learning? This is how I can help:

Ultimate Articulate Storyline Online Course

Want to learn Articulate Storyline the smart way? So that you can save up to 40 hours per e-learning course? Subscribe now to my Ultimate Articulate Storyline Training with a $50 discount with the coupon UPWemail.

This online Articulate Storyline course is the fastest way to speed up your Articulate Storyline e-learning skills and learn a proven e-learning development process from design to implementation.

Knowledge Library

Watch over 100 detailed tutorials, reviews and how-to videos from my popular Youtube channel.

Build Better E-learning With Templates

Leave a Comment