GASL is a javascript utility for Articulate Storyline that allows additional tracking to Google Analytics.
GASL hooks into the SCORM functions of a published Storyline project. Storyline publishes its table of contents information to "story_content/frame.xml". When resume data is saved, it is checked against the navigation to determine the current slide and then sent to GA for tracking.
- Automatic and manual pageView tracking
- Manual event tracking
-
Update navigation in Storyline which will be published to "story_content/frame.xml".
-
Only pages included in the navigation will be automatically tracked in Google Analytics.
Home > Player > Menu > Reset from story (icon)
-
-
Add the following line to the published "story.html", "index_lms.html", and "index_lms_html5.html" just before the
</html>
tag...<script src="gasl.js" type="text/javascript"></script>
In Storyline, create a Javascript trigger. To manually track a pageView, use the following code (where sTitle is optional):
gasl.trackPageview(sPath, [sTitle]);
To manually track an event, use the following code (where sLabel and eventData are optional):
gasl.trackEvent(sCategory, sAction, [sLabel, eventData]);
See the comments in gasl.js (particularly the gaConfig) for additonal usage information.
Note: GASL does not automatically track slide numbers because it's possible for a slide to move in your project which would invalidate historical data in Google Analytics.
Automatic event tracking based on SCORM interactions would be difficult because the cmi.suspend_data is compressed with a proprietary algorithm. It is chunked and base64 encoded. To decode, you would have to know the number of parts to each chunk which could possibly be extrapolated from the html5 output.
Think GASL could do better? Suggest improvements via a pull request!
GASL has been tested with the following:
- Articulate Storyline 2 Update 3: 1412.922
- Published with SCORM 1.2 and HTML5
- Chrome 45, Firefox 38, IE 7+