platformAnalyticsEvents.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. CHOSE_SENTRY_FX = 'integrations.platform_create_modal_sentry_fx_clicked',
  11. }
  12. export type PlatformEventParameters = {
  13. [key in PlatformEvents]: {} & IntegrationView;
  14. };
  15. export const platformEventMap: Record<PlatformEvents, string> = {
  16. [PlatformEvents.DOCS]: 'Integrations: Platform Example App Docs Clicked',
  17. [PlatformEvents.EXAMPLE_SOURCE]:
  18. 'Integrations: Platform Example App Source Code Clicked',
  19. [PlatformEvents.OPEN_CREATE_MODAL]:
  20. 'Integrations: Platform Open Create Integration Modal',
  21. [PlatformEvents.CHOSE_INTERNAL]: 'Integrations: Platform Chose Internal Integration',
  22. [PlatformEvents.INTERNAL_DOCS]:
  23. 'Integrations: Platform Internal Integration Docs Clicked',
  24. [PlatformEvents.CHOSE_PUBLIC]: 'Integrations: Platform Chose Public Integration',
  25. [PlatformEvents.PUBLIC_DOCS]: 'Integrations: Platform Public Integration Docs Clicked',
  26. [PlatformEvents.CHOSE_SENTRY_FX]: 'Integrations: Platform Chose Sentry FX',
  27. };
  28. export const platformEventLinkMap: Partial<Record<PlatformEvents, string>> = {
  29. [PlatformEvents.DOCS]:
  30. 'https://docs.sentry.io/product/integrations/integration-platform/',
  31. [PlatformEvents.EXAMPLE_SOURCE]:
  32. 'https://github.com/getsentry/integration-platform-example/',
  33. [PlatformEvents.INTERNAL_DOCS]:
  34. 'https://docs.sentry.io/product/integrations/integration-platform/internal-integration/',
  35. [PlatformEvents.PUBLIC_DOCS]:
  36. 'https://docs.sentry.io/product/integrations/integration-platform/public-integration/',
  37. };