Permalink
Browse files

adding Google Analytics to aplication layout

  • Loading branch information...
1 parent 54de464 commit 9649c43f4710ab6721412afcd12539ff2e2b9366 @benilovj benilovj committed Jan 29, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 app/views/layouts/application.html.erb
View
12 app/views/layouts/application.html.erb
@@ -47,5 +47,17 @@
<%= yield :extra_javascript %>
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-38052350-1']);
+ _gaq.push(['_setDomainName', 'production.alphagov.co.uk']);
+ _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>
</body>
</html>

0 comments on commit 9649c43

Please sign in to comment.