Google analytics integration

davidsyril Community Member Posts: 11
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.


Dynamic Dev team.


  • ssneg
    ssneg Community Member Posts: 1,456 ♪ Opening Act ♪
    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:
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    ga(&#039;create&#039;, &#039;UA-XXXXX-Y&#039;, &#039;auto&#039;);
    ga(&#039;send&#039;, &#039;pageview&#039;);
    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.
  • davidsyril
    davidsyril Community Member Posts: 11
    Thanks very much for the quick reply. Really useful.
  • loraguardtree
    loraguardtree Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 2 ☆ Roadie ☆
    Has anyone used this script since Google Analytics updated?