Permalink
Browse files

google anlytics

  • Loading branch information...
1 parent 4ca2da2 commit 941ba3464b41fb1165267dd5284b40e51102439f @c0 c0 committed Mar 7, 2012
Showing with 15 additions and 4 deletions.
  1. +15 −4 app/views/layouts/application.html.erb
@@ -12,8 +12,19 @@
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <body>
- <%= yield %>
- </body>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-29772599-1']);
+ _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);
+ })();
+ </script>
+</head>
+<body>
+ <%= yield %>
+</body>
</html>

0 comments on commit 941ba34

Please sign in to comment.