Getting Google Analytics from a Storyline Website


Just thought that you might be interested.....

Via some code additions to the published story.html file, (which has been renamed to an index.html file...), have managed to start getting Google analytics off my Storyline-based Website.

High "bounce" rate, because they basically have nowhere else to go (!), but spending average 1 minute on the site, which is about as good as I could have hoped.

I know it's not the usual way to run a website, but it's plenty good for me at the moment.


52 Replies
Ashley Terwilliger-Pollard

Hi Jessica,

This forum discussion is a bit older and I'm not sure if folks are still subscribed here but you could always use the "contact me" button on a ELH users' profile to reach out to them directly! Adrian is still on staff, but he doesn't get back into the forums as often and it's not a set up I can offer help with.

Best of luck with your project! 

Irina Poloubessov

Dear Ashley,
I have a question on tracking courses done in Rise and saved for Web (no LMS), located on our own servers,  with Piwik code for tracking?
If a learner navigates between lessons -- can we track on which lesson they bounce off? Because Rise exports a single .html file , how can we distinguish user activity within the whole course, between the lessons? Is it possible?
I posted a thread here , unfortunately no replies yet

Logan Stahler


Just wondering if anyone has had any recent success with this?  I have tried adding the javascript both for page views and event types, but neither is sending to GA.  I know that GA is working, because I am seeing the general landing page hits.    

Thanks for any help!


Logan Stahler

UPDATE:  Our web developer found the correct javascript code necessary to send page views from a SL360 project back to our GA account!  The codes that were shared earlier in this thread were not working, likely due to the new html output of SL360.  

If you have a project that you're deploying for the web, and you have a GA account set up and ready to collect, use the following javascript anywhere in the project that you want a page view to be reported to GA:



(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),



 ga('create', 'GA_TRACKING_CODE', 'auto');

ga('send', 'pageview', 'PAGE_NAME');


NOTE: you will need to change 2 things in the code above for it to work for you:

1.  Change GA_TRACKING_CODE to the unique tracking code provided to you within GA - it’s under Admin, Tracking Info, and then Tracking Code.

2.  Change PAGE_NAME to whatever you want the title of your page/action to be.  For example, if you changed it to 'IntroSlide', then GA would report an IntroSlide page view when triggered.  Note that this could also be an action, like 'ClickedYesButton' - while GA shows it as a page view, you might find it useful to track clicks in this manner.  

Hope this helps!


Kim Ervin

Thanks Logan!

Here's what I've done - I created a trigger on a slide to execute JavaScript when user clicks Get Started button and inserted the altered code (with our GA tracking code and desired action title). Published SL360 project for web and uploaded the story.html file to the server. No GA analytics are being recorded. Is there any editing to the story.html that is necessary?

Thanks a bunch for your helpful comments.