debian-mirror-gitlab/app/assets/javascripts/sidebar/track_invite_members.js
2021-11-11 11:23:49 +05:30

14 lines
371 B
JavaScript

import $ from 'jquery';
import Tracking from '~/tracking';
export default function initTrackInviteMembers(userDropdown) {
const { trackAction, trackLabel } = userDropdown.querySelector(
'.js-invite-members-track',
).dataset;
$(userDropdown).on('shown.bs.dropdown', () => {
Tracking.event(undefined, trackAction, {
label: trackLabel,
});
});
}