Commit a0a92dc8 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch...

Merge branch '333745-make-gitlab-tracking-enabled-the-ssot-for-the-snowplow_enabled-setting' into 'master'

Make Gitlab::Tracking.enabled? our SSoT for the snowplow_enabled setting

See merge request gitlab-org/gitlab!64150
parents 72226e69 231e03e9
...@@ -17,6 +17,6 @@ module TrackingHelper ...@@ -17,6 +17,6 @@ module TrackingHelper
def tracking_enabled? def tracking_enabled?
Rails.env.production? && Rails.env.production? &&
::Gitlab::CurrentSettings.snowplow_enabled? ::Gitlab::Tracking.enabled?
end end
end end
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
- else - else
%link{ { rel: 'preload', href: stylesheet_url('application'), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} } %link{ { rel: 'preload', href: stylesheet_url('application'), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} }
%link{ { rel: 'preload', href: stylesheet_url("highlight/themes/#{user_color_scheme}"), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} } %link{ { rel: 'preload', href: stylesheet_url("highlight/themes/#{user_color_scheme}"), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} }
- if Gitlab::CurrentSettings.snowplow_enabled? && Gitlab::CurrentSettings.snowplow_collector_hostname - if Gitlab::Tracking.enabled? && Gitlab::CurrentSettings.snowplow_collector_hostname
%link{ rel: 'preconnect', href: Gitlab::CurrentSettings.snowplow_collector_hostname, crossorigin: '' } %link{ rel: 'preconnect', href: Gitlab::CurrentSettings.snowplow_collector_hostname, crossorigin: '' }
- return unless Gitlab::CurrentSettings.snowplow_enabled? - return unless Gitlab::Tracking.enabled?
= javascript_tag do = javascript_tag do
:plain :plain
......
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
private private
def enabled? def enabled?
Gitlab::CurrentSettings.snowplow_enabled? Gitlab::Tracking.enabled?
end end
def tracker def tracker
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment