From 02d2834de72c9b4e795c0357a37f49e0a6ebb3aa Mon Sep 17 00:00:00 2001 From: j8seangel Date: Mon, 29 Jul 2024 13:19:56 +0200 Subject: [PATCH] track workspace migrations --- .../features/workspace/workspace-migration.hooks.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/fishing-map/features/workspace/workspace-migration.hooks.tsx b/apps/fishing-map/features/workspace/workspace-migration.hooks.tsx index a529a79e4f..290458b1a7 100644 --- a/apps/fishing-map/features/workspace/workspace-migration.hooks.tsx +++ b/apps/fishing-map/features/workspace/workspace-migration.hooks.tsx @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next' import parse from 'html-react-parser' import { DatasetsMigration, DataviewType } from '@globalfishingwatch/api-types' import { Button } from '@globalfishingwatch/ui-components' +import { TrackCategory, trackEvent } from 'features/app/analytics.hooks' import { selectDeprecatedDataviewInstances, selectHasDeprecatedDataviewInstances, @@ -121,10 +122,18 @@ export const useMigrateWorkspaceToast = () => { toast.dismiss(toastId.current) } const dissmissToast = () => { + trackEvent({ + category: TrackCategory.WorkspaceManagement, + action: 'Skip workspace migration', + }) closeToast() } const updateWorkspace = async () => { + trackEvent({ + category: TrackCategory.WorkspaceManagement, + action: 'Migrate workspace', + }) toast.update(toastId.current, { render: , })