Module: Gitlab::Tracking::Helpers

Included in:
Experimentation::ControllerConcern, ProductAnalyticsTracking, RedisTracking
Defined in:
lib/gitlab/tracking/helpers.rb

Instance Method Summary collapse

Instance Method Details

#dnt_enabled?Boolean

Returns:

  • (Boolean)

6
7
8
# File 'lib/gitlab/tracking/helpers.rb', line 6

def dnt_enabled?
  Gitlab::Utils.to_boolean(request.headers['DNT'])
end

#trackable_html_request?Boolean

Returns:

  • (Boolean)

10
11
12
# File 'lib/gitlab/tracking/helpers.rb', line 10

def trackable_html_request?
  request.format.html? && !dnt_enabled?
end