Knowledge Base

Add Google Analytics to your site

Google Analytics is a very good and popular tool which allows you to collect basic visitor data from your site.

If you are not familiar with it you can read the getting started page. We are interested in web tracking and we’ll be adding the code directly to the site.

Get the tracking code by following the instructions above, it should look something like this

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', 'UA-XXXXXXXX-Y', 'auto');
ga('send', 'pageview');

For modern themes we suggest you grab the child theme from our downloads section (or create one if you are not using one of our themes), then copy over the theme’s header.php file to the child and paste the entirety of the code just before the closing </head> tag. Alternatively you can use a plugin like the Insert Headers & Footers one to do that without file editing.

Older themes with CSSIgniter Settings panel

Navigate to CSSIgniter Settings > Google Options and paste the code in the Google Analytics box, then click the Save changes button above.