google analytics code added

This commit is contained in:
Christian Mueller
2012-06-13 20:24:31 +02:00
parent 4ffaf3da40
commit 5849893a7c
3 changed files with 12 additions and 2 deletions
-1
View File
@@ -6,5 +6,4 @@ pom.xml
/lib/ /lib/
/classes/ /classes/
.lein-* .lein-*
resources/public/js/*
.crossover-cljs .crossover-cljs
+9
View File
@@ -0,0 +1,9 @@
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32546723-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);
})();
+3 -1
View File
@@ -3,6 +3,7 @@
[NoteHub.settings :only [get-message]] [NoteHub.settings :only [get-message]]
[NoteHub.views.css-generator] [NoteHub.views.css-generator]
[noir.core :only [defpartial]] [noir.core :only [defpartial]]
[noir.options :only [dev-mode?]]
[hiccup.page :only [include-js html5]] [hiccup.page :only [include-js html5]]
[hiccup.element :only [javascript-tag]])) [hiccup.element :only [javascript-tag]]))
@@ -22,7 +23,8 @@
"&subset=latin,cyrillic") " " "+") "&subset=latin,cyrillic") " " "+")
:rel "stylesheet" :rel "stylesheet"
:type "text/css"}] :type "text/css"}]
[:style {:type "text/css"} (global-css params)]] [:style {:type "text/css"} (global-css params)]
(if-not dev-mode? (include-js "/js/google-analytics.js"))]
(if (params :js) (if (params :js)
[:body content [:body content
(javascript-tag "var CLOSURE_NO_DEPS = true;") (javascript-tag "var CLOSURE_NO_DEPS = true;")