Add a custom YARD footer for Google Analytics.
This commit is contained in:
parent
8037a958b1
commit
53e4668775
|
@ -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 %>
|
Loading…
Reference in New Issue