Google analytics integration
April 7, 2016 12:00 AM
I haven't got much experience using Google Analytics integration into Lectora. I'm not sure if this is even possible. Would be great if you guys could answer my questions.
Is it possible to track a module on an LMS and a HTML version?
Would like to know if you can get a 'time on page' from each page in a module?
Is there any useful guides or links out there that would provide more information.
Thanks
Dynamic Dev team.
Discussion (3)
Thanks very much for the quick reply. Really useful.
Register for Google Analytics and get your ID (UA-something-something).
In Lectora, Add External HTML Object to your title. Set it to META tags. Enter the following code in there:
undefined
(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';, ';UA-XXXXX-Y';, ';auto';);
ga(';send';, ';pageview';);
undefined
Replace XXXXX-Y with your own Google Analytics ID. Voila, now you can track your course in LMS or outside of LMS, the only condition is that Google server isn't blocked by e.g. a corporate firewall.
As for what you can track, Google calls it "Session duration", so this is what you should look for in Google Analytics panel.
Has anyone used this script since Google Analytics updated?