Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #46 from alphagov/google_analytics

adding Google Analytics to aplication layout
  • Loading branch information...
commit d274609f74a733f380736db9a8c4381230a5b3a1 2 parents 54de464 + 9649c43
@benilovj benilovj authored
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>
Please sign in to comment.
Something went wrong with that request. Please try again.