discoverAnalyticsEvents.tsx 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. export type DiscoverEventParameters = {
  2. 'discover_v2.add_equation': {};
  3. 'discover_v2.build_new_query': {};
  4. 'discover_v2.change_sort': {sort: string};
  5. 'discover_v2.facet_map.clicked': {tag: string};
  6. 'discover_v2.prebuilt_query_click': {query_name?: string};
  7. 'discover_v2.processed_baseline_toggle.clicked': {toggled: string};
  8. 'discover_v2.remove_default': {source: 'homepage' | 'prebuilt-query' | 'saved-query'};
  9. 'discover_v2.saved_query_click': {};
  10. 'discover_v2.set_as_default': {
  11. source: 'homepage' | 'prebuilt-query' | 'saved-query' | 'context-menu';
  12. // For breaking down context-menu events
  13. type?: 'prebuilt-query' | 'saved-query';
  14. };
  15. 'discover_v2.tour.advance': {duration: number; step: number};
  16. 'discover_v2.tour.close': {duration: number; step: number};
  17. 'discover_v2.tour.start': {};
  18. 'discover_v2.view_saved_queries': {};
  19. 'discover_views.add_to_dashboard.confirm': {};
  20. 'discover_views.add_to_dashboard.modal_open': {saved_query: boolean};
  21. };
  22. export type DiscoverEventKey = keyof DiscoverEventParameters;
  23. export const discoverEventMap: Record<DiscoverEventKey, string | null> = {
  24. 'discover_v2.add_equation': 'Dicoverv2: Equation added',
  25. 'discover_v2.build_new_query': 'Discoverv2: Build a new Discover Query',
  26. 'discover_v2.change_sort': 'Discoverv2: Sort By Changed',
  27. 'discover_v2.facet_map.clicked': 'Discoverv2: Clicked on a tag on the facet map',
  28. 'discover_v2.prebuilt_query_click': 'Discoverv2: Click a pre-built query',
  29. 'discover_v2.processed_baseline_toggle.clicked':
  30. 'Discoverv2: Clicked processed baseline toggle',
  31. 'discover_v2.tour.advance': 'Discoverv2: Tour Advance',
  32. 'discover_v2.tour.close': 'Discoverv2: Tour Close',
  33. 'discover_v2.tour.start': 'Discoverv2: Tour Start',
  34. 'discover_v2.saved_query_click': 'Discoverv2: Click a saved query',
  35. 'discover_v2.view_saved_queries': 'Discoverv2: Click Saved Queries button',
  36. 'discover_v2.set_as_default': 'Discoverv2: Click set as default',
  37. 'discover_v2.remove_default': 'Discoverv2: Click remove default',
  38. 'discover_views.add_to_dashboard.modal_open':
  39. 'Discover2: Add to Dashboard modal opened',
  40. 'discover_views.add_to_dashboard.confirm':
  41. 'Discover2: Add to Dashboard modal form submitted',
  42. };