diff --git a/frontend/src/metabase/query_builder/components/AlertModals.jsx b/frontend/src/metabase/query_builder/components/AlertModals.jsx index c035d3591c20ed58ef3c188fa008514d7ff72897..ffebdc7bea7296895638b8cb29f648a69556dbc1 100644 --- a/frontend/src/metabase/query_builder/components/AlertModals.jsx +++ b/frontend/src/metabase/query_builder/components/AlertModals.jsx @@ -39,6 +39,7 @@ import cxs from "cxs"; import ChannelSetupModal from "metabase/components/ChannelSetupModal"; import ButtonWithStatus from "metabase/components/ButtonWithStatus"; import { apiUpdateQuestion } from "metabase/query_builder/actions"; +import MetabaseAnalytics from "metabase/lib/analytics"; const getScheduleFromChannel = channel => _.pick( @@ -117,6 +118,8 @@ export class CreateAlertModalContent extends Component { // OR should the modal visibility be part of QB redux state // (maybe check how other modals are implemented) onAlertCreated(); + + MetabaseAnalytics.trackEvent("Alert", "Create", alert.alert_condition) }; proceedFromEducationalScreen = () => { @@ -288,6 +291,8 @@ export class UpdateAlertModalContent extends Component { await updateAlert(modifiedAlert); onAlertUpdated(); + + MetabaseAnalytics.trackEvent("Alert", "Update", modifiedAlert.alert_condition) }; onDeleteAlert = async () => {