Skip to content

Commit a9c133c

Browse files
committed
Whoops, almost forgot the GA
1 parent cd61081 commit a9c133c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

app/views/layouts/application.html.haml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
= stylesheet_link_tag "application"
1212
= javascript_include_tag "application"
1313
= csrf_meta_tags
14+
- if Rails.env.production?
15+
:javascript
16+
var _gaq = _gaq || [];
17+
_gaq.push(['_setAccount', 'UA-10499799-1']);
18+
_gaq.push(['_trackPageview']);
19+
20+
(function() {
21+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
22+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
23+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
24+
})();
25+
1426
%body{:class => "body-#{@page_class}"}
1527
%header.topbar
1628
.topbar-inner
@@ -21,7 +33,7 @@
2133
= render "shared/menu/user"
2234

2335
= yield :top
24-
36+
2537
- sidebar = yield :sidebar
2638

2739
#content-wrap{:class => @page_class}

0 commit comments

Comments
 (0)