How to add Google Analytics to your Mahara site

Adding Google Analytics to your Mahara site is very easy – you can follow the 3 simple steps below to do so.

Step 1

Get your tracking code from your Google Analytics account.


Step 2

Go to your Mahara’s installation folder and open “config.php” with a text editor. Go to the end of the file and add

$cfg->additionalhtmlhead = " ". 

Step 3

Paste your tracking code into the “addionalhtmlhead” as shown in the figure below.


Looking for a professional Mahara theme?

Take a look at our responsive Mahara themes for Mahara 15.10. They all have their matching Moodle themes too.