Add a custom YARD footer for Google Analytics.

This commit is contained in:
Nathan Weizenbaum 2009-11-23 15:03:48 -08:00
parent 8037a958b1
commit 53e4668775
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
<%= superb :footer %>
<% if ENV["ANALYTICS"] %>
<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("<%= ENV["ANALYTICS"] %>");
pageTracker._trackPageview();
} catch(err) {}</script>
<% end %>