Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/tracking/destinations/snowplow.rb')
-rw-r--r--lib/gitlab/tracking/destinations/snowplow.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/gitlab/tracking/destinations/snowplow.rb b/lib/gitlab/tracking/destinations/snowplow.rb
index 5596e9acd30..ddcd4693738 100644
--- a/lib/gitlab/tracking/destinations/snowplow.rb
+++ b/lib/gitlab/tracking/destinations/snowplow.rb
@@ -8,6 +8,8 @@ module Gitlab
class Snowplow < Base
extend ::Gitlab::Utils::Override
+ SNOWPLOW_NAMESPACE = 'gl'
+
override :event
def event(category, action, label: nil, property: nil, value: nil, context: nil)
return unless enabled?
@@ -19,7 +21,7 @@ module Gitlab
def options(group)
additional_features = Feature.enabled?(:additional_snowplow_tracking, group, type: :ops)
{
- namespace: Gitlab::Tracking::SNOWPLOW_NAMESPACE,
+ namespace: SNOWPLOW_NAMESPACE,
hostname: hostname,
cookie_domain: cookie_domain,
app_id: app_id,
@@ -28,16 +30,16 @@ module Gitlab
}.transform_keys! { |key| key.to_s.camelize(:lower).to_sym }
end
+ def enabled?
+ Gitlab::CurrentSettings.snowplow_enabled?
+ end
+
def hostname
Gitlab::CurrentSettings.snowplow_collector_hostname
end
private
- def enabled?
- Gitlab::Tracking.enabled?
- end
-
def app_id
Gitlab::CurrentSettings.snowplow_app_id
end
@@ -54,7 +56,7 @@ module Gitlab
@tracker ||= SnowplowTracker::Tracker.new(
emitter,
SnowplowTracker::Subject.new,
- Gitlab::Tracking::SNOWPLOW_NAMESPACE,
+ SNOWPLOW_NAMESPACE,
app_id
)
end