Mahara

Mahara Git

You can get the latest code for Mahara from their Gitlab repository: https://git.mahara.org/mahara/mahara

Clone from:

SSH git@git.mahara.org:mahara/mahara.git
HTTPS https://git.mahara.org/mahara/mahara.git

Further information about the repsitory is explained in the Developer Area.

Remember that when you clone the code, the public directory is htdocs and you'll need to point your web server to that (and not the top level).

Also if you don't have any CSS files in the raw theme (i.e. the style directory) is missing you'll need to run make css from the top level directory (which has Makefile).

This requires NodeJS set up with any relevant packages.

Mahara and Google Analytics

You can add the Google Analytics script snippet to a configuration parameter called additionalhtmlhead (you also have the option of using additionalhtmltopofbody and additionalhtmlfooter).

For example in your config.php you can add something like this, which is the Google Analytics tracking code used by this site:

$cfg->additionalhtmlhead = "
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-144211591-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-144211591-1');
</script>
";

This, and many other configuration settings and examples can be found in your Mahara installation under /lib/config-defaults.php