Getting Google Analytics from a Storyline Website

Jul 10, 2012

Hi,

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.

Bruce

http://www.pperf.co.uk

59 Replies
Logan Stahler
Emanuel Falade

Does this work in a SL360 zipped SCORM 1.2 on an LMS that I'm not admin on? We're trying to only track launches of content we've created that we're licensing  to a client to use on their LMS.

Hi Emanuel -

I'm no expert, but as long as you have the appropriate Google info and javascript, it shouldn't matter how the course is published or where it's hosted because the module sends the data off to Google. It's not like the LMS has to send the data to Google.

-Logan

Digital Partners

I tried the tutorial here https://stevenwestmoreland.com/2019/03/using-google-analytics-with-articulate-storyline.html

Could not get it to give slide analytics, still getting google analytics only on the main published URL and storyline main file name.

Also tried help from here https://www.youtube.com/watch?v=AosLz3-Oa9Q again still does not give page or screen counts based on slides in the storyline

Any help to share on what works would be great!

Thank you

Suki

 

Digital Partners

Hi Logan

Thanks for replying back! I just wanted to check the code you kindly provided below in replies in this discussion, how do you add this code to each slide, is it the execute javascript  when timeline starts? Also has the url changed for the one added below? I have created a google analytics property and obtained the GA code πŸ™‚. Would I still need to add the full  google site tag?

Thankyou!!!!

 

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

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

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

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

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

Logan Stahler

Hi Suki-

Yes, this is added as a new "execute JS" trigger wherever you want something tracked within the project. 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!

Logan

Digital Partners

Update, I changed to create the usual universal analytics property in GA and it works! However puzzled why this is not being picked up by GA 4 property especially as UA will retire July 2023. I think it could be this code ga('send', 'pageview', 'PAGE_NAME'); that Ga 4 property is not picking up. Could it be the pageview event name?