From 959f81474baa01ffa15f5c613f45bfbf50d62f21 Mon Sep 17 00:00:00 2001 From: jywarren Date: Fri, 23 Feb 2018 12:21:40 -0500 Subject: [PATCH] ga fixes --- app/assets/javascripts/application.js | 3 +-- app/assets/javascripts/google_analytics.js | 6 ------ app/views/layouts/_google_analytics.html.erb | 15 ++++++++------- 3 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 app/assets/javascripts/google_analytics.js diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c29f1006aa..160f94c11c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -48,7 +48,6 @@ //= require short-code-forms/dist/short-code-prompts.js //= require wikis.js //= require chart.js/dist/Chart.js -// require turbolinks // Temporarily removed while fixing -//= require google_analytics.js //= require header_footer.js +// require turbolinks // Temporarily removed while fixing diff --git a/app/assets/javascripts/google_analytics.js b/app/assets/javascripts/google_analytics.js deleted file mode 100644 index c7b9a1b113..0000000000 --- a/app/assets/javascripts/google_analytics.js +++ /dev/null @@ -1,6 +0,0 @@ -$(document).on("ready turbolinks:load", function() { - if (typeof ga == "function"){ - ga("set", "location", event.data.url) - ga("send", "pageview") - } -}); diff --git a/app/views/layouts/_google_analytics.html.erb b/app/views/layouts/_google_analytics.html.erb index 765cdd8db4..9740309256 100644 --- a/app/views/layouts/_google_analytics.html.erb +++ b/app/views/layouts/_google_analytics.html.erb @@ -1,9 +1,10 @@ <% if Rails.env.production? %> - + + + <% end %>