Add Google Analytics

From PGVWiki
(Redirected from How to:Add Google Analytics)
Jump to: navigation, search

PhpGedView can automatically add the code required for Google Analytics.

There are two versions of the Google Analytics code. PhpGedView will generate the "new" version. This offers more features than the "old" version, but is incompatible with the Urchin Tracker software.

You need to obtain a user code from Google Analytics. This looks something like UA-XXXXX-XX. You then need to add the following line to the end of your config.php file.

define('PGV_GOOGLE_ANALYTICS', 'UA-XXXXX-XX');

The end of config.php should then look something like this:

$CONFIGURED = true;
require_once("includes/session.php");
define('PGV_GOOGLE_ANALYTICS', 'UA-XXXXX-XX');

This functionality was added in SVN3040 / release 4.1.6