Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Google Analytics to footer of yard documentation

  • Loading branch information...
commit b4f93d997dd2ff8b88a293c76108c01001d4ff16 1 parent 090f9d6
Luke Bayes authored
3  script/google_analytics_footer.rb
View
@@ -0,0 +1,3 @@
+
+YARD::Templates::Engine.register_template_path File.join('sprout', 'script', 'templates')
+
17 script/templates/default/layout/html/footer.erb
View
@@ -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>
+
Please sign in to comment.
Something went wrong with that request. Please try again.