Skip to content
Browse files

Added Google Analytics to footer of yard documentation

  • Loading branch information...
1 parent 090f9d6 commit b4f93d997dd2ff8b88a293c76108c01001d4ff16 @lukebayes committed Jan 29, 2011
Showing with 20 additions and 0 deletions.
  1. +3 −0 script/google_analytics_footer.rb
  2. +17 −0 script/templates/default/layout/html/footer.erb
View
3 script/google_analytics_footer.rb
@@ -0,0 +1,3 @@
+
+YARD::Templates::Engine.register_template_path File.join('sprout', 'script', 'templates')
+
View
17 script/templates/default/layout/html/footer.erb
@@ -0,0 +1,17 @@
+<div id="footer">
+ Generated on <%= Time.now.strftime("%c") %> by
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
+ <%= YARD::VERSION %> (ruby-<%= RUBY_VERSION %>).
+</div>
+
+<!-- Google Analytics for projectsprouts.org -->
+<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">
+var pageTracker = _gat._getTracker("UA-1619511-4");
+pageTracker._initData();
+pageTracker._trackPageview();
+</script>
+

0 comments on commit b4f93d9

Please sign in to comment.
Something went wrong with that request. Please try again.