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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /lib/product_analytics
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'lib/product_analytics')
-rw-r--r--lib/product_analytics/event_params.rb7
-rw-r--r--lib/product_analytics/tracker.rb11
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/product_analytics/event_params.rb b/lib/product_analytics/event_params.rb
index d938fe1f594..07e0bc8b43a 100644
--- a/lib/product_analytics/event_params.rb
+++ b/lib/product_analytics/event_params.rb
@@ -40,7 +40,12 @@ module ProductAnalytics
domain_userid: params['duid'],
user_fingerprint: params['fp'],
page_referrer: params['refr'],
- page_url: params['url']
+ page_url: params['url'],
+ se_category: params['se_ca'],
+ se_action: params['se_ac'],
+ se_label: params['se_la'],
+ se_property: params['se_pr'],
+ se_value: params['se_va']
}
end
diff --git a/lib/product_analytics/tracker.rb b/lib/product_analytics/tracker.rb
new file mode 100644
index 00000000000..d4a88b879f0
--- /dev/null
+++ b/lib/product_analytics/tracker.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module ProductAnalytics
+ class Tracker
+ # The file is located in the /public directory
+ URL = Gitlab.config.gitlab.url + '/-/sp.js'
+
+ # The collector URL minus protocol and /i
+ COLLECTOR_URL = Gitlab.config.gitlab.url.sub(/\Ahttps?\:\/\//, '') + '/-/collector'
+ end
+end