Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Custom modifications of the Analytics Plugin

oliverraduneroliverraduner ✭✭
edited March 2011 in Vanilla 2.0 - 2.8
I modified the Analytics plugin with a couple things, which you could probably consider to include in the next version:

Don't insert Google Analytics anywhere in the Admin area...

(Paste this in the Plugin file just before the "$WebId"-line)
$DoNotInsertOn =  array('DashboardController',
'SettingsController',
'PluginsController',
'ImportController',
'MessageController',
'RoleController',
'RoutesController',
'SetupController',
'UserController',
'AuthenticationController',
'UtilityController');
if (InArrayI($Sender->ControllerName, $DoNotInsertOn)) return;

Use the config.php to store the Analytics Key

new line in config.php:
$Configuration['Plugins']['Analytics']['UA'] = 'UA-000000-0';
changed line in the plugin:
$WebId = C('Plugins.Analytics.UA');

Comments

Sign In or Register to comment.