From 4483d004d4b443c9d447f757bee7906a09e28a1d Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Tue, 11 Dec 2012 22:30:36 -0700 Subject: [PATCH] had to put analytics back into .html, wasn't working in loadScripts file --- src/app/loadJavascripts.coffee | 19 ++----------------- views/app/index.html | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/app/loadJavascripts.coffee b/src/app/loadJavascripts.coffee index 1df70fbd47..3053dbaca2 100644 --- a/src/app/loadJavascripts.coffee +++ b/src/app/loadJavascripts.coffee @@ -27,20 +27,5 @@ module.exports = (model) -> # Specifying callback in options param is vital! Otherwise you get blank screen, see http://stackoverflow.com/a/12200566/362790 google.load "visualization", "1", {packages:["corechart"], callback: ->} - # Twitter - # - - # Google Analyatics - if model.get('_nodeEnv') == 'production' - _gaq = _gaq or [] - _gaq.push ["_setAccount", "UA-33510635-1"] - _gaq.push ["_trackPageview"] - (-> - ga = document.createElement("script") - ga.type = "text/javascript" - ga.async = true - ga.src = ((if "https:" is document.location.protocol then "https://ssl" else "http://www")) + ".google-analytics.com/ga.js" - s = document.getElementsByTagName("script")[0] - s.parentNode.insertBefore ga, s - )() - + # Note, Google Analyatics giving beef if in this file. Moved back to index.html. It's ok, it's async - really the + # syncronous requires up top are what benefit the most from this file. diff --git a/views/app/index.html b/views/app/index.html index f0752b4085..920499fbb9 100644 --- a/views/app/index.html +++ b/views/app/index.html @@ -407,4 +407,20 @@
{:item.text}
- \ No newline at end of file + + + + {#if equal(_nodeEnv,"production")} + + + {/} \ No newline at end of file