Skip to content

Commit

Permalink
robotType for calibration download analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Dec 19, 2024
1 parent c467c4b commit c29f800
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
LegacyStyledText,
TYPOGRAPHY,
} from '@opentrons/components'
import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data'

import { Slideout } from '/app/atoms/Slideout'
import { Divider } from '/app/atoms/structure'
Expand Down Expand Up @@ -107,7 +108,9 @@ export function DeviceResetSlideout({
e.preventDefault()
doTrackEvent({
name: ANALYTICS_CALIBRATION_DATA_DOWNLOADED,
properties: {},
properties: {
robotType: isFlex ? FLEX_ROBOT_TYPE : OT2_ROBOT_TYPE,
},
})
saveAs(
new Blob([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
useInstrumentsQuery,
useModulesQuery,
} from '@opentrons/react-api-client'
import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data'

import { TertiaryButton } from '/app/atoms/buttons'
import {
useDeckCalibrationData,
Expand Down Expand Up @@ -72,7 +74,9 @@ export function CalibrationDataDownload({
e.preventDefault()
doTrackEvent({
name: ANALYTICS_CALIBRATION_DATA_DOWNLOADED,
properties: {},
properties: {
robotType: isFlex ? FLEX_ROBOT_TYPE : OT2_ROBOT_TYPE,
},
})
saveAs(
new Blob([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
useModulesQuery,
} from '@opentrons/react-api-client'
import { instrumentsResponseFixture } from '@opentrons/api-client'
import { OT2_ROBOT_TYPE } from '@opentrons/shared-data'

import { i18n } from '/app/i18n'
import {
Expand Down Expand Up @@ -145,7 +146,7 @@ describe('CalibrationDataDownload', () => {
fireEvent.click(downloadButton)
expect(mockTrackEvent).toHaveBeenCalledWith({
name: ANALYTICS_CALIBRATION_DATA_DOWNLOADED,
properties: {},
properties: { robotType: OT2_ROBOT_TYPE },
})
})

Expand Down

0 comments on commit c29f800

Please sign in to comment.