Skip to content

Commit

Permalink
Add Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
gf3 committed Mar 5, 2012
1 parent ad85fe7 commit 80644e3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/cljbin/views/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
font-style: normal;
}")

(def ^{:private true} gajs
"var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-319181-10']);
_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);
})();")

(defn layout [& content]
(response/response
(html5 {:lang "en-CA"}
Expand All @@ -25,6 +36,7 @@
[:meta {:content "IE=edge,chrome=1" :http-equiv "X-UA-Compatible"}]
[:meta {:content "width=device-width, initial-scale=1" :name "viewport"}]
[:title "cljbin"]
[:script gajs]
[:style css]
(include-css "http://fonts.googleapis.com/css?family=Droid+Sans+Mono")
(include-css "/css/normalize.css")
Expand Down

0 comments on commit 80644e3

Please sign in to comment.