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.rb')
-rw-r--r--lib/gitlab/tracking.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index 19be468e3d5..618e359211b 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -14,8 +14,8 @@ module Gitlab
Gitlab::Tracking.event(category, action.to_s, **args)
end
- def track_self_describing_event(schema_url, event_data_json, **args)
- Gitlab::Tracking.self_describing_event(schema_url, event_data_json, **args)
+ def track_self_describing_event(schema_url, data:, **args)
+ Gitlab::Tracking.self_describing_event(schema_url, data: data, **args)
end
end
@@ -26,10 +26,11 @@ module Gitlab
def event(category, action, label: nil, property: nil, value: nil, context: nil)
snowplow.event(category, action, label: label, property: property, value: value, context: context)
+ product_analytics.event(category, action, label: label, property: property, value: value, context: context)
end
- def self_describing_event(schema_url, event_data_json, context: nil)
- snowplow.self_describing_event(schema_url, event_data_json, context: context)
+ def self_describing_event(schema_url, data:, context: nil)
+ snowplow.self_describing_event(schema_url, data: data, context: context)
end
def snowplow_options(group)
@@ -49,6 +50,10 @@ module Gitlab
def snowplow
@snowplow ||= Gitlab::Tracking::Destinations::Snowplow.new
end
+
+ def product_analytics
+ @product_analytics ||= Gitlab::Tracking::Destinations::ProductAnalytics.new
+ end
end
end
end