Browse Source

ref(analytics): remove unused analytics hooks (#47509)

Hooks unused, time to delete
Stephen Cefali 1 year ago
parent
commit
21d614cab2
1 changed files with 0 additions and 55 deletions
  1. 0 55
      static/app/types/hooks.tsx

+ 0 - 55
static/app/types/hooks.tsx

@@ -183,12 +183,8 @@ export type CustomizationHooks = {
  * Analytics / tracking / and operational metrics backend hooks.
  */
 export type AnalyticsHooks = {
-  // TODO(scefali): Below are deprecated and should be replaced
-  'analytics:event': LegacyAnalyticsEvent;
   'analytics:init-user': AnalyticsInitUser;
   'analytics:log-experiment': AnalyticsLogExperiment;
-  'analytics:track-adhoc-event': AnalyticsTrackAdhocEvent;
-  'analytics:track-event': AnalyticsTrackEvent;
   'analytics:track-event-v2': AnalyticsTrackEventV2;
   'metrics:event': MetricsEvent;
 };
@@ -363,25 +359,6 @@ type FeatureDisabledHook = (opts: {
  */
 type AnalyticsInitUser = (user: User) => void;
 
-/**
- * Trigger analytics tracking in the hook store.
- */
-type AnalyticsTrackEvent = (opts: {
-  /**
-   * Arbitrary data to track
-   */
-  [key: string]: any;
-  /**
-   * The key used to identify the event.
-   */
-  eventKey: string;
-  /**
-   * The English string used as the name of the event.
-   */
-  eventName: string;
-  organization_id: string | number | null;
-}) => void;
-
 /**
  * Trigger analytics tracking in the hook store.
  */
@@ -425,20 +402,6 @@ type AnalyticsTrackEventV2 = (
   }
 ) => void;
 
-/**
- * Trigger ad hoc analytics tracking in the hook store.
- */
-type AnalyticsTrackAdhocEvent = (opts: {
-  /**
-   * Arbitrary data to track
-   */
-  [key: string]: any;
-  /**
-   * The key used to identify the event.
-   */
-  eventKey: string;
-}) => void;
-
 /**
  * Trigger experiment observed logging.
  */
@@ -453,24 +416,6 @@ type AnalyticsLogExperiment = (opts: {
   organization?: Organization;
 }) => void;
 
-/**
- * Trigger analytics tracking in the hook store.
- *
- * Prefer using `analytics:track-event` or `analytics:track-adhock-event`.
- *
- * @deprecated This is the legacy interface.
- */
-type LegacyAnalyticsEvent = (
-  /**
-   * The key used to identify the event.
-   */
-  name: string,
-  /**
-   * Arbitrary data to track
-   */
-  data: {[key: string]: any}
-) => void;
-
 /**
  * Trigger recording a metric in the hook store.
  */