diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-23 15:06:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-23 15:06:29 +0000 |
commit | b3f7042d06c53e5d4b8cad42e1b2679d0450f1a7 (patch) | |
tree | 373a039989e0497a71a4844f48e27d5f82f0e198 /app/assets/javascripts/pages/sessions/new | |
parent | 09ffaae1328da918056512ddc674913f0bb7b134 (diff) | |
download | gitlab-ce-b3f7042d06c53e5d4b8cad42e1b2679d0450f1a7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages/sessions/new')
-rw-r--r-- | app/assets/javascripts/pages/sessions/new/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/sessions/new/index.js b/app/assets/javascripts/pages/sessions/new/index.js index 55bc93a2b13..c0e798e004f 100644 --- a/app/assets/javascripts/pages/sessions/new/index.js +++ b/app/assets/javascripts/pages/sessions/new/index.js @@ -5,6 +5,7 @@ import NoEmojiValidator from '../../../emoji/no_emoji_validator'; import SigninTabsMemoizer from './signin_tabs_memoizer'; import OAuthRememberMe from './oauth_remember_me'; import preserveUrlFragment from './preserve_url_fragment'; +import Tracking from '~/tracking'; document.addEventListener('DOMContentLoaded', () => { new UsernameValidator(); // eslint-disable-line no-new @@ -19,4 +20,12 @@ document.addEventListener('DOMContentLoaded', () => { // Save the URL fragment from the current window location. This will be present if the user was // redirected to sign-in after attempting to access a protected URL that included a fragment. preserveUrlFragment(window.location.hash); + + if (gon.tracking_data) { + const tab = document.querySelector(".new-session-tabs a[href='#register-pane']"); + const { category, action, ...data } = gon.tracking_data; + tab.addEventListener('click', () => { + Tracking.event(category, action, data); + }); + } }); |