From eff2e4240f77dccff8abffb5c41a92df0b31358b Mon Sep 17 00:00:00 2001 From: Matej Minar Date: Tue, 15 Jun 2021 12:05:49 +0200 Subject: [PATCH] feat(ui): Add release details chart to analytics --- .../app/views/releases/detail/overview/index.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/static/app/views/releases/detail/overview/index.tsx b/static/app/views/releases/detail/overview/index.tsx index 61924f54f08640..2af3ab9ff2d413 100644 --- a/static/app/views/releases/detail/overview/index.tsx +++ b/static/app/views/releases/detail/overview/index.tsx @@ -8,6 +8,7 @@ import TransactionsList, {DropdownOption} from 'app/components/discover/transact import {Body, Main, Side} from 'app/components/layouts/thirds'; import {t} from 'app/locale'; import {GlobalSelection, NewQuery, Organization, ReleaseProject} from 'app/types'; +import {trackAnalyticsEvent} from 'app/utils/analytics'; import {getUtcDateString} from 'app/utils/dates'; import {TableDataRow} from 'app/utils/discover/discoverQuery'; import EventView from 'app/utils/discover/eventView'; @@ -68,8 +69,17 @@ class ReleaseOverview extends AsyncView { } handleYAxisChange = (yAxis: YAxis) => { - const {location, router} = this.props; - const {eventType: _eventType, vitalType: _vitalType, ...query} = location.query; + const {location, router, organization} = this.props; + const {eventType, vitalType, ...query} = location.query; + + trackAnalyticsEvent({ + eventKey: `release_detail.change_chart`, + eventName: `Release Detail: Change Chart`, + organization_id: parseInt(organization.id, 10), + display: yAxis, + eventType, + vitalType, + }); router.push({ ...location,