Skip to content

Commit

Permalink
Add clicks for setup mode
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Sep 17, 2020
1 parent 811cbe6 commit b45d372
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions x-pack/plugins/monitoring/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,5 @@ export const ALERT_EMAIL_SERVICES = ['gmail', 'hotmail', 'icloud', 'outlook365',
* The saved object type for various monitoring data
*/
export const SAVED_OBJECT_TELEMETRY = 'monitoring-telemetry';

export const TELEMETRY_METRIC_BUTTON_CLICK = 'btnclick__';
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { EuiButton } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import './enter_button.scss';
import { METRIC_TYPE, useUiTracker } from '../../../../observability/public';
import { TELEMETRY_METRIC_BUTTON_CLICK } from '../../../common/constants';

export interface SetupModeEnterButtonProps {
enabled: boolean;
Expand All @@ -28,7 +29,10 @@ export const SetupModeEnterButton: React.FC<SetupModeEnterButtonProps> = (
async function enterSetupMode() {
setIsLoading(true);
await props.toggleSetupMode(true);
trackStat({ metric: `btnclick_setupmode`, metricType: METRIC_TYPE.CLICK });
trackStat({
metric: `${TELEMETRY_METRIC_BUTTON_CLICK}setupmode_enter`,
metricType: METRIC_TYPE.CLICK,
});
setIsLoading(false);
}

Expand Down

0 comments on commit b45d372

Please sign in to comment.