The Google Analytics module consists of 2 components that can be employed independently: The Google Logger injects the google analytics javascript snippet into your source code and logs relevant events (as of now only crawler visits) The Analyzer adds the Google Analytics UI to your CMS.
The Google Analytics module consists of 2 components that can be employed independently:
The Google Logger injects the google analytics javascript snippet into your source code and logs relevant events (as of now only crawler visits)
The Analyzer adds the GA UI to your CMS
If you want to help out and develop some of these improvements please fork this project and submit a pull request (see this guide on how to do this: http://help.github.com/pull-requests/). I greatly appreciate any help for improving the module.
Quick improvements:
Bigger improvements:
GoogleLogger::activate('UA-XXXXX-Y');
(hardcode google code, useful in combination with _ss_environment.php) or GoogleLogger::activate('SiteConfig');
(use SiteConfig for setup)GoogleAnalyzer::activate('1234567', "[email protected]", "mypassword");
(hardcode credentials, useful in combination with _ss_environment.php) or GoogleAnalyzer::activate('SiteConfig');
(use SiteConfig for setup)GoogleLogger::set_event_tracking_enabled(true)
http://www.mysite.com/dev/build?flush=all
)GoogleLogger::$web_crawlers['Safari'] = 'safari';
Registers the additional crawler "Safari" when HTTP_USER_AGENT matches the regular expression "safari". Useful for debugging.
The google analytics javascript snippet is designed as a SilverStripe template, so you can easily customize it by just placing your own version of the snippet in themes/yourthemename/templates/GoogleAnalyticsJSSnippet.ss. If you want to hardcode the snippet into your template you can just omit the google code in the logger and no snippet will be injected.
Because the logger is by default only attached to the content controller the google analytics javascript snippet gets only injected on pages. Attach it to your custom controller to cover these calls also.
Please help to improve this module by submitting your feedback/bug reports/support requests/suggestions. Thanks
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem