Revert "Tie legacy analytics ID to environment"

This reverts commit 3e15194eff.

This will allow monitoring the new experience analytics to not be tampered by the
legacy analytics.
pull/1/head
Liam Morley 4 years ago
parent 65ee27742a
commit 6aa9f00adc

@ -1,7 +1,6 @@
module Legacy
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception, prepend: true
before_action :set_google_analytics_id
layout "legacy/application"
@ -19,11 +18,5 @@ module Legacy
end
end
private
def set_google_analytics_id
@google_analytics_id = ENV['GOOGLE_ANALYTICS_ID']
end
end
end

@ -13,13 +13,13 @@
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
/ Global site tag (gtag.js) - Google Analytics
%script{:async => "", :src => "https://www.googletagmanager.com/gtag/js?id=#{@google_analytics_id}"}
%script{:async => "", :src => "https://www.googletagmanager.com/gtag/js?id=UA-132936999-1"}
:javascript
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', #{@google_analytics_id.to_json.html_safe});
gtag('config', 'UA-132936999-1');
%body
.container

Loading…
Cancel
Save