From 9e9eb7a4f8ef2d7df51734b401956b33d768f198 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 24 Mar 2025 11:57:37 +0000 Subject: [PATCH] Chore: add new theme event, modify preference type in drawer (#102523) * add new theme event, modify preference type in drawer * update to theme_drawer --- .../core/components/SharedPreferences/SharedPreferences.tsx | 5 +++++ .../core/components/ThemeSelector/ThemeSelectorDrawer.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/SharedPreferences/SharedPreferences.tsx b/public/app/core/components/SharedPreferences/SharedPreferences.tsx index a7dcaf1e293..d4e4d669841 100644 --- a/public/app/core/components/SharedPreferences/SharedPreferences.tsx +++ b/public/app/core/components/SharedPreferences/SharedPreferences.tsx @@ -120,6 +120,11 @@ export class SharedPreferences extends PureComponent { if (confirmationResult) { const { homeDashboardUID, theme, timezone, weekStart, language, queryHistory, navbar } = this.state; + reportInteraction('grafana_preferences_save_button_clicked', { + preferenceType: this.props.preferenceType, + theme, + language, + }); await this.service.update({ homeDashboardUID, theme, timezone, weekStart, language, queryHistory, navbar }); window.location.reload(); } diff --git a/public/app/core/components/ThemeSelector/ThemeSelectorDrawer.tsx b/public/app/core/components/ThemeSelector/ThemeSelectorDrawer.tsx index a633bdb3f53..32a2e869b90 100644 --- a/public/app/core/components/ThemeSelector/ThemeSelectorDrawer.tsx +++ b/public/app/core/components/ThemeSelector/ThemeSelectorDrawer.tsx @@ -22,7 +22,7 @@ export function ThemeSelectorDrawer({ onClose }: Props) { const onChange = (theme: ThemeRegistryItem) => { reportInteraction('grafana_preferences_theme_changed', { toTheme: theme.id, - preferenceType: 'user', + preferenceType: 'theme_drawer', }); changeTheme(theme.id, false); };