Add Google Analytics
Add Google Analytics


Former-commit-id: c64f37b2545054d1482676e5f04dd933bcd024b9

--- a/include/template.inc.php
+++ b/include/template.inc.php
@@ -71,9 +71,27 @@
            <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
             
     <script type="text/javascript" src="javascripts/flotr2/flotr2.js"></script>
+        <?php
+        if (strpos($_SERVER['SERVER_NAME'], ".gs")) {
+            ?>
+    <script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-12341040-2']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
 
         </body>
     </html>
 
 <?php }
+            }
+