diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index d73433beac1d211e60a677583d832ddf8d7468eb..8d805fc0c1a49a26370c92a6c5a8d4bb2e58129d 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -52,6 +52,7 @@ import UsersSelect from './users_select';
 import RefSelectDropdown from './ref_select_dropdown';
 import GfmAutoComplete from './gfm_auto_complete';
 import ShortcutsBlob from './shortcuts_blob';
+import UsagePing from './usage_ping';
 import UsernameValidator from './username_validator';
 import VersionCheckImage from './version_check_image';
 import Wikis from './wikis';
@@ -433,7 +434,7 @@ import OAuthRememberMe from './oauth_remember_me';
           new Admin();
           switch (path[1]) {
             case 'cohorts':
-              new gl.UsagePing();
+              new UsagePing();
               break;
             case 'groups':
               new UsersSelect();
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 35bdd167236532b602a90612599ae392231af3d1..8a90aaf9336f84fdbf3d8831f12dc1f363c8682f 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -154,7 +154,6 @@ import './syntax_highlight';
 import './task_list';
 import './todos';
 import './tree';
-import './usage_ping';
 import './user';
 
 // eslint-disable-next-line global-require, import/no-commonjs
diff --git a/app/assets/javascripts/usage_ping.js b/app/assets/javascripts/usage_ping.js
index fd3af7d7ab62813a78a19297b8f4b3320627168c..2389056bd023582aea98ef39f108f91c55792a49 100644
--- a/app/assets/javascripts/usage_ping.js
+++ b/app/assets/javascripts/usage_ping.js
@@ -1,4 +1,4 @@
-function UsagePing() {
+export default function UsagePing() {
   const usageDataUrl = $('.usage-data').data('endpoint');
 
   $.ajax({
@@ -10,6 +10,3 @@ function UsagePing() {
     },
   });
 }
-
-window.gl = window.gl || {};
-window.gl.UsagePing = UsagePing;