From 7f844c970b099d1444ed6970d866e444eaf2e3e8 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sat, 3 Sep 2011 13:42:09 -0700 Subject: [PATCH] Apparently the Google Analytics code won't get compiled in production without an ERB extension --- app/assets/javascripts/analytics.js.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/assets/javascripts/analytics.js.erb diff --git a/app/assets/javascripts/analytics.js.erb b/app/assets/javascripts/analytics.js.erb new file mode 100644 index 0000000..eda4eac --- /dev/null +++ b/app/assets/javascripts/analytics.js.erb @@ -0,0 +1,10 @@ +var _gaq = _gaq || []; +_gaq.push(['_setAccount', 'UA-20825280-2']); +_gaq.push(['_setDomainName', '.adoptahydrant.org']); +_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); +})();