Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

Custom modifications of the Analytics Plugin

This discussion is related to the Analytics addon.
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.