summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 15:09:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 15:09:10 +0000
commit8e129497b2565b8c595ef4f806d9a9595ca654e5 (patch)
tree7afeeca3ea58013c1e8c3a2055661bacf65577da /app/assets/javascripts/pages
parent8ae26d705abe341b03bc15d4373d6cd0c77c0baf (diff)
downloadgitlab-ce-8e129497b2565b8c595ef4f806d9a9595ca654e5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r--app/assets/javascripts/pages/registrations/new/index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/registrations/new/index.js b/app/assets/javascripts/pages/registrations/new/index.js
index a33d11f3613..4b4b0555bb2 100644
--- a/app/assets/javascripts/pages/registrations/new/index.js
+++ b/app/assets/javascripts/pages/registrations/new/index.js
@@ -1,9 +1,20 @@
import LengthValidator from '~/pages/sessions/new/length_validator';
import UsernameValidator from '~/pages/sessions/new/username_validator';
import NoEmojiValidator from '~/emoji/no_emoji_validator';
+import Tracking from '~/tracking';
document.addEventListener('DOMContentLoaded', () => {
new UsernameValidator(); // eslint-disable-line no-new
new LengthValidator(); // eslint-disable-line no-new
new NoEmojiValidator(); // eslint-disable-line no-new
});
+
+document.addEventListener('SnowplowInitialized', () => {
+ if (gon.tracking_data) {
+ const { category, action } = gon.tracking_data;
+
+ if (category && action) {
+ Tracking.event(category, action);
+ }
+ }
+});