add google analytics support

This commit is contained in:
2013-02-19 21:57:31 +08:00
parent 44def60613
commit 1b45f49ccf
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5243064-17']);
_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);
})();
+1
View File
@@ -50,4 +50,5 @@ html
a href="https://github.com/wahyd4/Libr/blob/master/README.md" 了解更多信息
= javascript_include_tag 'application'
= javascript_include_tag 'ga'
= yield :javascript_includes