From 4d3c4c6ae93dde8e51122a62adbc659a37b6137e Mon Sep 17 00:00:00 2001 From: Domagoj Kriskovic Date: Tue, 18 Jul 2023 12:25:54 +0200 Subject: [PATCH] [cm6] add tracking to figure modal submit events (#13917) GitOrigin-RevId: f0c755e2f336b5f0c6caf283bed69db65a0c3c92 --- .../components/figure-modal/figure-modal-footer.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/components/figure-modal/figure-modal-footer.tsx b/services/web/frontend/js/features/source-editor/components/figure-modal/figure-modal-footer.tsx index c6691b9c3f..b1818499a0 100644 --- a/services/web/frontend/js/features/source-editor/components/figure-modal/figure-modal-footer.tsx +++ b/services/web/frontend/js/features/source-editor/components/figure-modal/figure-modal-footer.tsx @@ -6,6 +6,7 @@ import { import Icon from '../../../../shared/components/icon' import { FC } from 'react' import { useTranslation } from 'react-i18next' +import { sendMB } from '../../../../infrastructure/event-tracking' export const FigureModalFooter: FC<{ onInsert: () => void @@ -91,7 +92,10 @@ const FigureModalAction: FC<{ bsStyle={null} className="btn-success" type="button" - onClick={onInsert} + onClick={() => { + onInsert() + sendMB('figure-modal-edit') + }} > {t('done')} @@ -104,7 +108,10 @@ const FigureModalAction: FC<{ className="btn-success" type="button" disabled={getPath === undefined} - onClick={onInsert} + onClick={() => { + onInsert() + sendMB('figure-modal-insert') + }} > {t('insert_figure')}