mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
chore: add data import type segment event [INS-3296] (#6765)
* chore: add data import type segment event [INS-3296] * fix
This commit is contained in:
parent
4952ff5515
commit
d5b8b2d6d1
@ -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<ImportModalProps> = ({
|
||||
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 },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
|
Loading…
Reference in New Issue
Block a user