debian-mirror-gitlab/app/assets/javascripts/sidebar/track_invite_members.js

13 lines
360 B
JavaScript
Raw Normal View History

2021-09-04 01:27:46 +05:30
import $ from 'jquery';
import Tracking from '~/tracking';
export default function initTrackInviteMembers(userDropdown) {
const { trackEvent, trackLabel } = userDropdown.querySelector('.js-invite-members-track').dataset;
$(userDropdown).on('shown.bs.dropdown', () => {
Tracking.event(undefined, trackEvent, {
label: trackLabel,
});
});
}