From 1f729853bb0e452772692b6619447e2136fa3b43 Mon Sep 17 00:00:00 2001 From: "Heinz N. Gies" Date: Thu, 20 May 2010 02:54:10 +0200 Subject: [PATCH] Fixed analytics code, again. --- src/tryclojure/core.clj | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/tryclojure/core.clj b/src/tryclojure/core.clj index 119e502..76cc03d 100644 --- a/src/tryclojure/core.clj +++ b/src/tryclojure/core.clj @@ -79,6 +79,18 @@ "/resources/public/javascript/tryclojure.js") [:title "TryClojure"]] [:body + [:script {:type "text/javascript"} + " + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-552543-3']); + _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); + })(); +"] [:div {:style "text-align: center;"} [:h1 "Try Clojure"]] [:div#container [:div#console.console] [:table.bottom {:border "0"} @@ -91,19 +103,7 @@ [:td [:div#changer [:p.bottom "Welcome to TryClojure. Above, you have a Clojure REPL. You can type expressions and see " "their results right here in your browser. We also have a brief tutorial to give you a " - "taste of Clojure. Try it out!"]]]]]] - [:script {:type "text/javascript"} - " - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-552543-3']); - _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); - })(); -"])) + "taste of Clojure. Try it out!"]]]]]])) (defn handler [{session :session}] {:status 200