[Bps-public-commit] App-Changeloggr branch, master, updated. 3a298c2ecd5947cc1d8bb3dd7740cfeaedc5ade0

Alex M Vandiver alexmv at bestpractical.com
Thu May 21 17:16:11 EDT 2009


The branch, master has been updated
       via  3a298c2ecd5947cc1d8bb3dd7740cfeaedc5ade0 (commit)
      from  1632e7d7e8febada3b8ea7b57e0029f829f4cc9f (commit)

Summary of changes:
 etc/config.yml                   |    2 +-
 lib/App/Changeloggr/View/Page.pm |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 3a298c2ecd5947cc1d8bb3dd7740cfeaedc5ade0
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Thu May 21 17:16:02 2009 -0400

    Google analytics

diff --git a/etc/config.yml b/etc/config.yml
index 31248b4..6a2d634 100644
--- a/etc/config.yml
+++ b/etc/config.yml
@@ -50,4 +50,4 @@ framework:
     TemplateRoot: share/web/templates
 application:
   BackgroundImport: 1
-
+  Production: 0
diff --git a/lib/App/Changeloggr/View/Page.pm b/lib/App/Changeloggr/View/Page.pm
index 82aaffa..897728e 100644
--- a/lib/App/Changeloggr/View/Page.pm
+++ b/lib/App/Changeloggr/View/Page.pm
@@ -10,6 +10,20 @@ sub render_footer {
     div {
         attr { id is "footer" };
     };
+    if (Jifty->config->app('Production')) {
+        outs_raw(<<'EOT');
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-937849-6");
+pageTracker._trackPageview();
+} catch(err) {}</script>});
+EOT
+    }
+
     $self->SUPER::render_footer(@_);
 }
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list