diff --git a/app/assets/javascripts/google_anlytics.js.coffee.erb b/app/assets/javascripts/google_anlytics.js.coffee.erb index d4f7069..6276cc2 100644 --- a/app/assets/javascripts/google_anlytics.js.coffee.erb +++ b/app/assets/javascripts/google_anlytics.js.coffee.erb @@ -37,6 +37,6 @@ class @GoogleAnalytics @analyticsId: -> '<%= ENV['GOOGLE'] %>' -<%- if ENV['GOOGLE'] %> +<% if ENV['GOOGLE'] %> GoogleAnalytics.load() <% end %> diff --git a/app/views/layouts/_google_analytics.html.slim b/app/views/layouts/_google_analytics.html.slim deleted file mode 100644 index 31028d7..0000000 --- a/app/views/layouts/_google_analytics.html.slim +++ /dev/null @@ -1,11 +0,0 @@ -- if ENV['GOOGLE'].present? - javascript: - var _gaq = _gaq || []; - _gaq.push(['_setAccount', '#{ENV['GOOGLE']}']); - _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); - })(); diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index b963ea4..1433b14 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -62,5 +62,3 @@ html = render 'common/welcome_new_year' = yield = render "layouts/footer" - - = render 'layouts/google_analytics'