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.
This commit is contained in:
Liam Morley 2021-12-02 09:34:52 -05:00
parent 65ee27742a
commit 6aa9f00adc
2 changed files with 2 additions and 9 deletions

View file

@ -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

View file

@ -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