issueAnalyticsEvents.tsx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. type IssueStream = {
  2. group_id: string;
  3. tab: string;
  4. was_shown_suggestion: boolean;
  5. };
  6. export type IssueEventParameters = {
  7. 'event_cause.dismissed': {};
  8. 'event_cause.docs_clicked': {};
  9. 'event_cause.snoozed': {};
  10. 'event_cause.viewed': {
  11. platform?: string;
  12. project_id?: string;
  13. };
  14. 'inbox_tab.issue_clicked': {
  15. group_id: string;
  16. };
  17. 'issue.search_sidebar_clicked': {};
  18. 'issue.shared_publicly': {};
  19. 'issue_error_banner.viewed': {
  20. error_message: string[];
  21. error_type: string[];
  22. group?: string;
  23. platform?: string;
  24. };
  25. 'issue_search.failed': {
  26. error: string;
  27. search_source: string;
  28. search_type: string;
  29. };
  30. 'issues_stream.issue_assigned': IssueStream & {
  31. assigned_type: string;
  32. did_assign_suggestion: boolean;
  33. assigned_suggestion_reason?: string;
  34. };
  35. 'issues_stream.issue_clicked': IssueStream;
  36. 'issues_tab.viewed': {
  37. num_issues: number;
  38. tab: string;
  39. };
  40. resolve_issue: {release: string};
  41. 'tag.clicked': {
  42. is_clickable: boolean;
  43. };
  44. };
  45. export type IssueEventKey = keyof IssueEventParameters;
  46. export const issueEventMap: Record<IssueEventKey, string | null> = {
  47. 'event_cause.viewed': null, // send to main event store only due to high event volume
  48. 'event_cause.docs_clicked': 'Event Cause Docs Clicked',
  49. 'event_cause.snoozed': 'Event Cause Snoozed',
  50. 'event_cause.dismissed': 'Event Cause Dismissed',
  51. 'issue_error_banner.viewed': 'Issue Error Banner Viewed',
  52. 'issues_tab.viewed': 'Viewed Issues Tab', // high volume but send to our secondary event store anyways
  53. 'issue_search.failed': 'Issue Search: Failed',
  54. 'issue.search_sidebar_clicked': 'Issue Search Sidebar Clicked',
  55. 'inbox_tab.issue_clicked': 'Clicked Issue from Inbox Tab',
  56. 'issues_stream.issue_clicked': 'Clicked Issue from Issues Stream',
  57. 'issues_stream.issue_assigned': 'Assigned Issue from Issues Stream',
  58. 'issue.shared_publicly': 'Issue Shared Publicly',
  59. resolve_issue: 'Resolve Issue',
  60. 'tag.clicked': 'Tag: Clicked',
  61. };