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.
@Monique - Thank you for posting this. I did stumble on this thread, and following what you described worked like a charm to help me track what slides people were visiting.
Could you let me know where exactly in the storyline HTML files did you add the Statcounter Code. I would like to add it to each of my slides to see the time spent on the page,etc. Thank You!
Hi, Mandar -- As this thread is a bit older, Russ and some of the other participants may no longer be subscribed, but you are welcome to reach out directly using the "Contact Me" link on an individual's profile page.
Any luck obtaining the step by step instructions for this? Would love to get clarity around getting started using Google Analytics for my next Storyline website.
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.
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 https://community.articulate.com/discussions/rise/tracking-rise-with-piwik
Thanks for linking the two discussions - the use of tracking outside of an LMS isn't something I can help with though, so I hope someone in the community is able to assist!
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.
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:
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.
Hey Logan, I just wanted to say thanks so much for posting your js example! Following the guidance you posted, I was able to get a Google Analytics page to receive pageview data from a course exactly the way I had hoped. Really appreciate you sharing this - it saved me loads of time today!
Logan, I ditto Jeanette's thanks!! One really basic question - where does the code need to go - in my SL360 project or in the published HTML file? On the intro slide, there is a get started button. I would like to track the number of clicks on this button. Thanks!
Place the code into the SL project on the intro slide. Create a trigger for that get started button to run Javascript, and plug in the code I provided (altered to fit your needs). Hope this helps!
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?
The button hits are a bit buried in the GA site. I found ours under "Site Content - Content Drilldown" in the admin menu on the left. Is that where you're looking?
If I don't have Articulate to make the triggers as indicated by Steven's doc link, can I use another editor to add the code snippets to each slide, ie Sublime? Thanks
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.
59 Replies
Hi
For editing story.html you can use Notepad++, software which you can download here: http://notepad-plus-plus.org/
I use Adobe Dreamweaver to open the story.html file and add the GA code.
@Monique - Thank you for posting this. I did stumble on this thread, and following what you described worked like a charm to help me track what slides people were visiting.
Hi Russ,
Could you let me know where exactly in the storyline HTML files did you add the Statcounter Code. I would like to add it to each of my slides to see the time spent on the page,etc. Thank You!
Hi, Mandar -- As this thread is a bit older, Russ and some of the other participants may no longer be subscribed, but you are welcome to reach out directly using the "Contact Me" link on an individual's profile page.
I built a small lib to help with this. See here...
https://community.articulate.com/discussions/articulate-storyline/google-analytics-in-storyline#reply-298362
Thanks for sharing in the threads Mark.
Any luck obtaining the step by step instructions for this? Would love to get clarity around getting started using Google Analytics for my next Storyline website.
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!
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
https://community.articulate.com/discussions/rise/tracking-rise-with-piwik
Hi Irina,
Thanks for linking the two discussions - the use of tracking outside of an LMS isn't something I can help with though, so I hope someone in the community is able to assist!
Hi-
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
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:
(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');
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!
Logan
Hey Logan, I just wanted to say thanks so much for posting your js example! Following the guidance you posted, I was able to get a Google Analytics page to receive pageview data from a course exactly the way I had hoped. Really appreciate you sharing this - it saved me loads of time today!
Hi Jeanette-
I'm so glad this helped you out! I always appreciate the help this forum has provided me, so I'm excited to be able to give back.
-Logan
Logan, I ditto Jeanette's thanks!! One really basic question - where does the code need to go - in my SL360 project or in the published HTML file? On the intro slide, there is a get started button. I would like to track the number of clicks on this button. Thanks!
Hi Kim!
Place the code into the SL project on the intro slide. Create a trigger for that get started button to run Javascript, and plug in the code I provided (altered to fit your needs). Hope this helps!
Logan
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.
Hey, Kim. Looks like the community got you covered! 🌟
Just a heads up that your email signature came through to the forums. This Peek recording will show you how to edit it out if you’d like!
Hi Kim-
The button hits are a bit buried in the GA site. I found ours under "Site Content - Content Drilldown" in the admin menu on the left. Is that where you're looking?
Logan
See this article for a detailed tutorial on using Google Analytics with Articulate Storyline:
https://stevenwestmoreland.com/2019/03/using-google-analytics-with-articulate-storyline.html
Steven, awesome resource. Thanks for sharing! Do you happen to know if it's possible to pass a Storyline variable as an event into Google Analytics?
With ga.js, (older GA version) should I use this code?
ga('send', 'screenview', {screenName: 'Thank You'});
or this one:
ga('send', 'pageview', 'Thank You');
Maybe it does not matter.
Thanks
If I don't have Articulate to make the triggers as indicated by Steven's doc link, can I use another editor to add the code snippets to each slide, ie Sublime? Thanks
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.