dashboardsAnalyticsEvents.tsx 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. export type DashboardsEventParameters = {
  2. 'dashboards_manage.change_sort': {
  3. sort: string;
  4. };
  5. 'dashboards_manage.create.start': {};
  6. 'dashboards_manage.search': {};
  7. 'dashboards_manage.templates.add': {
  8. dashboard_id: string;
  9. dashboard_title: string;
  10. was_previewed: boolean;
  11. };
  12. 'dashboards_manage.templates.preview': {
  13. dashboard_id: string;
  14. };
  15. 'dashboards_manage.templates.toggle': {
  16. show_templates: boolean;
  17. };
  18. 'dashboards_views.add_widget_modal.change': {
  19. field: string;
  20. from: string;
  21. value: string;
  22. widget_type: string;
  23. };
  24. 'dashboards_views.add_widget_modal.confirm': {
  25. data_set: string;
  26. };
  27. 'dashboards_views.add_widget_modal.opened': {};
  28. 'dashboards_views.add_widget_modal.save': {
  29. data_set: string;
  30. };
  31. 'dashboards_views.edit_widget_modal.confirm': {};
  32. 'dashboards_views.edit_widget_modal.opened': {};
  33. 'dashboards_views.open_in_discover.opened': {
  34. widget_type: string;
  35. };
  36. 'dashboards_views.query_selector.opened': {
  37. widget_type: string;
  38. };
  39. 'dashboards_views.query_selector.selected': {
  40. widget_type: string;
  41. };
  42. 'dashboards_views.widget_library.add': {
  43. num_widgets: number;
  44. };
  45. 'dashboards_views.widget_library.add_widget': {
  46. title: string;
  47. };
  48. 'dashboards_views.widget_library.opened': {};
  49. 'dashboards_views.widget_library.switch_tab': {
  50. to: string;
  51. };
  52. };
  53. export type DashboardsEventKey = keyof DashboardsEventParameters;
  54. export const dashboardsEventMap: Record<DashboardsEventKey, string | null> = {
  55. 'dashboards_views.add_widget_modal.opened': 'Dashboards2: Add Widget Modal opened',
  56. 'dashboards_views.add_widget_modal.change':
  57. 'Dashboards2: Field changed in Add Widget Modal',
  58. 'dashboards_views.edit_widget_modal.opened': 'Dashboards2: Edit Widget Modal Opened',
  59. 'dashboards_views.query_selector.opened':
  60. 'Dashboards2: Query Selector opened for Widget',
  61. 'dashboards_views.query_selector.selected':
  62. 'Dashboards2: Query selected in Query Selector',
  63. 'dashboards_views.open_in_discover.opened': 'Dashboards2: Widget Opened In Discover',
  64. 'dashboards_views.add_widget_modal.confirm':
  65. 'Dashboards2: Add Widget to Dashboard modal form submitted',
  66. 'dashboards_views.add_widget_modal.save':
  67. 'Dashboards2: Widget saved directly to Dashboard from Add Widget to Dashboard modal',
  68. 'dashboards_views.edit_widget_modal.confirm':
  69. 'Dashboards2: Edit Dashboard Widget modal form submitted',
  70. 'dashboards_views.widget_library.add': 'Dashboards2: Number of prebuilt widgets added',
  71. 'dashboards_views.widget_library.add_widget':
  72. 'Dashboards2: Title of prebuilt widget added',
  73. 'dashboards_views.widget_library.switch_tab':
  74. 'Dashboards2: Widget Library tab switched',
  75. 'dashboards_views.widget_library.opened': 'Dashboards2: Add Widget Library opened',
  76. 'dashboards_manage.search': 'Dashboards Manager: Search',
  77. 'dashboards_manage.change_sort': 'Dashboards Manager: Sort By Changed',
  78. 'dashboards_manage.create.start': 'Dashboards Manager: Dashboard Create Started',
  79. 'dashboards_manage.templates.toggle': 'Dashboards Manager: Template Toggle Changed',
  80. 'dashboards_manage.templates.add': 'Dashboards Manager: Template Added',
  81. 'dashboards_manage.templates.preview': 'Dashboards Manager: Template Previewed',
  82. };