Forums | Mahara Community
Support
/
Installing Google Analytics
05 November 2015, 13:25
I've looked at older forums on how to install Google Analytics but they seem to be obsolete for more recent versions (e.g.15.04 and up).
Are there proper instructions on how to setup Google Analytics with Mahara?
Thanks.
05 November 2015, 17:04
Hi Robin,
You should be able to do it using the optional $cfg->additionalhtmlhead setting (documented in htdocs/lib/config-defaults.php).
Just paste your Google Analytics tracking snippet into the param, in your config.php file. It should look something like this:
$cfg->additionalhtmlhead = <<<'HTML'
<script type="application/javascript">
// Your snippet goes here
</script>
HTML;
Cheers,
Aaron