debian-mirror-gitlab/app/assets/javascripts/pages/registrations/new/index.js

21 lines
685 B
JavaScript
Raw Normal View History

2019-12-21 20:55:43 +05:30
import LengthValidator from '~/pages/sessions/new/length_validator';
import UsernameValidator from '~/pages/sessions/new/username_validator';
import NoEmojiValidator from '~/emoji/no_emoji_validator';
2020-04-08 14:13:33 +05:30
import Tracking from '~/tracking';
2019-12-21 20:55:43 +05:30
document.addEventListener('DOMContentLoaded', () => {
new UsernameValidator(); // eslint-disable-line no-new
new LengthValidator(); // eslint-disable-line no-new
new NoEmojiValidator(); // eslint-disable-line no-new
});
2020-04-08 14:13:33 +05:30
document.addEventListener('SnowplowInitialized', () => {
if (gon.tracking_data) {
const { category, action } = gon.tracking_data;
if (category && action) {
Tracking.event(category, action);
}
}
});