diff --git a/Dockerfile.ui b/Dockerfile.ui index da9c36d38960..f134f5d62883 100644 --- a/Dockerfile.ui +++ b/Dockerfile.ui @@ -24,7 +24,6 @@ COPY cvat-canvas3d/ /tmp/cvat-canvas3d/ COPY cvat-canvas/ /tmp/cvat-canvas/ COPY cvat-ui/ /tmp/cvat-ui/ -ARG WA_PAGE_VIEW_HIT ARG UI_APP_CONFIG ARG CLIENT_PLUGINS ARG DISABLE_SOURCE_MAPS diff --git a/cvat-ui/src/components/cvat-app.tsx b/cvat-ui/src/components/cvat-app.tsx index ff9d2e1637b3..ef2fe1a824da 100644 --- a/cvat-ui/src/components/cvat-app.tsx +++ b/cvat-ui/src/components/cvat-app.tsx @@ -65,7 +65,6 @@ import { Organization, getCore } from 'cvat-core-wrapper'; import { ErrorState, NotificationState, NotificationsState, PluginsState, } from 'reducers'; -import { customWaViewHit } from 'utils/environment'; import showPlatformNotification, { platformInfo, stopNotifications, @@ -142,7 +141,7 @@ class CVATApplication extends React.PureComponent { - customWaViewHit(newLocation.pathname, newLocation.search, newLocation.hash); const { location: prevLocation } = this.props; onChangeLocation(prevLocation.pathname, newLocation.pathname); diff --git a/cvat-ui/src/utils/environment.ts b/cvat-ui/src/utils/environment.ts index 9f73417199c7..c757afe8e0c6 100644 --- a/cvat-ui/src/utils/environment.ts +++ b/cvat-ui/src/utils/environment.ts @@ -1,5 +1,5 @@ // Copyright (C) 2020-2022 Intel Corporation -// Copyright (C) 2022 CVAT.ai Corp +// Copyright (C) 2024 CVAT.ai Corporation // // SPDX-License-Identifier: MIT @@ -9,23 +9,3 @@ export function isDev(): boolean { return process.env.NODE_ENV === 'development'; } - -export function customWaViewHit(pageName?: string, queryString?: string, hashInfo?: string): void { - const waHitFunctionName = process.env.WA_PAGE_VIEW_HIT; - if (waHitFunctionName) { - const waHitFunction = new Function( - 'pageName', - 'queryString', - 'hashInfo', - `if (typeof ${waHitFunctionName} === 'function') { - ${waHitFunctionName}(pageName, queryString, hashInfo); - }`, - ); - try { - waHitFunction(pageName, queryString, hashInfo); - } catch (error: any) { - // eslint-disable-next-line - console.error(`Web analytics hit function has failed. ${error.toString()}`); - } - } -}