From 6dca3d4c483a3dce0c4c26dc651dce40901f7bb4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 13 Jan 2011 20:20:04 +0000 Subject: [PATCH] ENHANCEMENT Added Google Analytics (fixes #6349) git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@115537 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- mysite/_config.php | 5 +++++ themes/docs/templates/DocumentationViewer.ss | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/mysite/_config.php b/mysite/_config.php index 0e21ecf..71b2f11 100644 --- a/mysite/_config.php +++ b/mysite/_config.php @@ -49,3 +49,8 @@ try{ // We want this to be reviewed by the whole community BasicAuth::protect_entire_site(false); + +Object::add_extension('DocumentationViewer', 'DocumentationViewerExtension'); +if(Director::isLive()) { + DocumentationViewerExtension::$google_analytics_code = 'UA-84547-8'; +} \ No newline at end of file diff --git a/themes/docs/templates/DocumentationViewer.ss b/themes/docs/templates/DocumentationViewer.ss index e1fa445..e9d9e87 100644 --- a/themes/docs/templates/DocumentationViewer.ss +++ b/themes/docs/templates/DocumentationViewer.ss @@ -82,5 +82,21 @@

Documentation powered by SilverStripe. Contribute to the Documentation Project.
Except where otherwise noted, content on this wiki is licensed under CC Attribution-Noncommercial-Share Alike 3.0 Unported

+ + <% if GoogleAnalyticsCode %> + + <% end_if %> \ No newline at end of file