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
def tracking_enabled?
Rails.env.production? &&
::Gitlab::CurrentSettings.snowplow_enabled?
::Gitlab::Tracking.enabled?
end
end
......@@ -7,5 +7,5 @@
- else
%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' } : {} }
- 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: '' }
- return unless Gitlab::CurrentSettings.snowplow_enabled?
- return unless Gitlab::Tracking.enabled?
= javascript_tag do
:plain
......
......@@ -18,7 +18,7 @@ module Gitlab
private
def enabled?
Gitlab::CurrentSettings.snowplow_enabled?
Gitlab::Tracking.enabled?
end
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