ShareButton: Add dropdown tracking (#95905)

This commit is contained in:
Juan Cabanas 2024-11-05 15:32:07 -03:00 committed by GitHub
parent da1a5426d0
commit ef4640abfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,10 @@ export default function ShareButton({ dashboard, panel }: { dashboard: Dashboard
}, [dashboard]);
const onMenuClick = useCallback((isOpen: boolean) => {
if (isOpen) {
DashboardInteractions.toolbarShareDropdownClick();
}
setIsOpen(isOpen);
}, []);

View File

@ -28,6 +28,9 @@ export const DashboardInteractions = {
toolbarShareClick: () => {
reportDashboardInteraction('toolbar_actions_clicked', { item: 'share' });
},
toolbarShareDropdownClick: () => {
reportDashboardInteraction('toolbar_actions_clicked', { item: 'share_dropdown' });
},
toolbarAddClick: () => {
reportDashboardInteraction('toolbar_actions_clicked', { item: 'add' });
},