diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /lib/gitlab/tracking.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'lib/gitlab/tracking.rb')
-rw-r--r-- | lib/gitlab/tracking.rb | 13 |
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 |