platformAnalyticsEvents.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {IntegrationView} from './index';
  2. export enum PlatformEvents {
  3. DOCS = 'integrations.platform_docs_clicked',
  4. EXAMPLE_SOURCE = 'integrations.platform_example_source_clicked',
  5. OPEN_CREATE_MODAL = 'integrations.platform_open_create_modal',
  6. CHOSE_INTERNAL = 'integrations.platform_create_modal_internal_clicked',
  7. INTERNAL_DOCS = 'integrations.platform_internal_docs_clicked',
  8. CHOSE_PUBLIC = 'integrations.platform_create_modal_public_clicked',
  9. PUBLIC_DOCS = 'integrations.platform_public_docs_clicked',
  10. }
  11. export type PlatformEventParameters = {
  12. [key in PlatformEvents]: {} & IntegrationView;
  13. };
  14. export const platformEventMap: Record<PlatformEvents, string> = {
  15. [PlatformEvents.DOCS]: 'Integrations: Platform Example App Docs Clicked',
  16. [PlatformEvents.EXAMPLE_SOURCE]:
  17. 'Integrations: Platform Example App Source Code Clicked',
  18. [PlatformEvents.OPEN_CREATE_MODAL]:
  19. 'Integrations: Platform Open Create Integration Modal',
  20. [PlatformEvents.CHOSE_INTERNAL]: 'Integrations: Platform Chose Internal Integration',
  21. [PlatformEvents.INTERNAL_DOCS]:
  22. 'Integrations: Platform Internal Integration Docs Clicked',
  23. [PlatformEvents.CHOSE_PUBLIC]: 'Integrations: Platform Chose Public Integration',
  24. [PlatformEvents.PUBLIC_DOCS]: 'Integrations: Platform Public Integration Docs Clicked',
  25. };
  26. export const platformEventLinkMap: Partial<Record<PlatformEvents, string>> = {
  27. [PlatformEvents.DOCS]:
  28. 'https://docs.sentry.io/product/integrations/integration-platform/',
  29. [PlatformEvents.EXAMPLE_SOURCE]:
  30. 'https://github.com/getsentry/integration-platform-example/',
  31. [PlatformEvents.INTERNAL_DOCS]:
  32. 'https://docs.sentry.io/product/integrations/integration-platform/internal-integration/',
  33. [PlatformEvents.PUBLIC_DOCS]:
  34. 'https://docs.sentry.io/product/integrations/integration-platform/public-integration/',
  35. };