debian-mirror-gitlab/app/assets/javascripts/projects/upload_file_experiment_tracking.js

10 lines
439 B
JavaScript
Raw Normal View History

2021-04-17 20:07:23 +05:30
import ExperimentTracking from '~/experimentation/experiment_tracking';
export const trackFileUploadEvent = (eventName) => {
const isEmpty = Boolean(document.querySelector('.project-home-panel.empty-project'));
const property = isEmpty ? 'empty' : 'nonempty';
const label = 'blob-upload-modal';
const FileUploadTracking = new ExperimentTracking('empty_repo_upload', { label, property });
FileUploadTracking.event(eventName);
};