diff --git a/public/app/features/alerting/unified/Analytics.ts b/public/app/features/alerting/unified/Analytics.ts index efaae6b6fc1..ebe07e43f9f 100644 --- a/public/app/features/alerting/unified/Analytics.ts +++ b/public/app/features/alerting/unified/Analytics.ts @@ -229,7 +229,14 @@ export const trackDeletedRuleRestoreFail = async () => { reportInteraction('grafana_alerting_deleted_rule_restore_error'); }; -export const trackImportToGMASuccess = async (payload: { importSource: 'yaml' | 'datasource' }) => { +export const trackImportToGMASuccess = async (payload: { + importSource: 'yaml' | 'datasource'; + isRootFolder: boolean; + namespace?: string; + ruleGroup?: string; + pauseRecordingRules: boolean; + pauseAlertingRules: boolean; +}) => { reportInteraction('grafana_alerting_import_to_gma_success', { ...payload }); }; diff --git a/public/app/features/alerting/unified/components/import-to-gma/ConfirmConvertModal.tsx b/public/app/features/alerting/unified/components/import-to-gma/ConfirmConvertModal.tsx index 024dbaf0f1b..e0288e1a995 100644 --- a/public/app/features/alerting/unified/components/import-to-gma/ConfirmConvertModal.tsx +++ b/public/app/features/alerting/unified/components/import-to-gma/ConfirmConvertModal.tsx @@ -152,7 +152,14 @@ export const ConfirmConversionModal = ({ importPayload, isOpen, onDismiss }: Mod const isRootFolder = isEmpty(targetFolder?.uid); - trackImportToGMASuccess({ importSource }); + trackImportToGMASuccess({ + importSource, + isRootFolder, + namespace, + ruleGroup, + pauseRecordingRules, + pauseAlertingRules, + }); const ruleListUrl = createListFilterLink(isRootFolder ? [] : [['namespace', targetFolder?.title ?? '']], { skipSubPath: true, });