Extension:Google Analytics Integration

The Google Analytics Integration extension inserts Google Universal Analytics (and/or other web analytics) tracking code in every page viewed. Exclusion of specific pages, namespaces, special pages and all pages for specific groups of users is configurable.

Usage

 * 1) Create a Google Analytics account
 * 2) Locate your UA number
 * 3) * For the legacy code block, it can be found on the following line: _uacct="UA-xxxxxxx-x";
 * 4) * For the new ga.js code block, it can be found on the following line: var pageTracker = _gat._getTracker("UA-xxxxxxx-x");
 * 5) Follow Installation Instructions
 * 6) Google Analytics stats should start populating within 24-48 hours.

Bugs

 * With PHP 5.3.2/5.3.3 on MediaWiki 1.16 or after use following fix. Your PHP version can be seen on the Special:Version page.

The error message before this fix is:
 * MediaWiki internal error. Exception caught inside exception handler.


 * The googleAnalytics.php file will override your variables that were set in the LocalSettings.php file if you include it after you set these variables. It will appear that settings are not working. Solution: Check the variables.


 * Analytics do not work with Extension:MobileFrontend. This is fixed in recent versions of MobileFrontend.