Welcome to mirror list, hosted at ThFree Co, Russian Federation.

upload_file_experiment_tracking.js « projects « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c5e93f19b32fa458cb91fac69f5701f7ecf549b8 (plain)
1
2
3
4
5
6
7
8
9
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);
};