From 36ef12f00d87bbe55b853bd5bfbeeacc222be5bf Mon Sep 17 00:00:00 2001 From: Geoffrey Grosenbach Date: Fri, 6 Apr 2018 20:42:48 -0700 Subject: [PATCH] Embed Google Analytics only in production This will clean up analytics which currently show non-published pages and an incorrect number of pageviews due to the Google Analytics script being run in development as well as production. --- website/source/layouts/layout.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index d35945497..0adbbd37d 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -42,12 +42,14 @@ <%= javascript_include_tag "application" %> + <% if config[:environment] == :build %> + <% end %> @@ -132,6 +134,7 @@ + <% if config[:environment] == :build %> + <% end %>