diff --git a/packages/insomnia/src/ui/components/modals/import-modal.tsx b/packages/insomnia/src/ui/components/modals/import-modal.tsx index de3fd8bfc..58573805c 100644 --- a/packages/insomnia/src/ui/components/modals/import-modal.tsx +++ b/packages/insomnia/src/ui/components/modals/import-modal.tsx @@ -13,6 +13,7 @@ import { useFetcher } from 'react-router-dom'; import styled from 'styled-components'; import { isScratchpadProject } from '../../../models/project'; +import { SegmentEvent } from '../../analytics'; import { ImportResourcesActionResult, ScanForResourcesActionResult, @@ -433,6 +434,11 @@ export const ImportModal: FC = ({ method: 'post', action: '/import/resources', }); + const type = scanResourcesFetcher.data ? scanResourcesFetcher.data.type?.id || 'unknown' : 'unknown'; + window.main.trackSegmentEvent({ + event: SegmentEvent.dataImport, + properties: { 'data-import-type': type }, + }); }} /> ) : (