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

15 lines
371 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) {
2021-11-11 11:23:49 +05:30
const { trackAction, trackLabel } = userDropdown.querySelector(
'.js-invite-members-track',
).dataset;
2021-09-04 01:27:46 +05:30
$(userDropdown).on('shown.bs.dropdown', () => {
2021-11-11 11:23:49 +05:30
Tracking.event(undefined, trackAction, {
2021-09-04 01:27:46 +05:30
label: trackLabel,
});
});
}