Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: add missing feature preview enabled event def (#31234)

Long Hoang551d1725237b
diff --git a/apps/studio/data/telemetry/send-event-mutation.ts b/apps/studio/data/telemetry/send-event-mutation.ts
index 3c39e446c07..2cc8968b088 100644
--- a/apps/studio/data/telemetry/send-event-mutation.ts
+++ b/apps/studio/data/telemetry/send-event-mutation.ts
@@ -13,6 +13,9 @@ import {
CronJobHistoryClickedEvent,
CronJobUpdateClickedEvent,
CronJobUpdatedEvent,
+ FeaturePreviewsClickedEvent,
+ FeaturePreviewEnabledEvent,
+ FeaturePreviewDisabledEvent,
TelemetryActions,
} from 'lib/constants/telemetry'
import { useRouter } from 'next/router'
@@ -27,6 +30,9 @@ export type SendEventVariables =
| CronJobUpdateClickedEvent
| CronJobDeleteClickedEvent
| CronJobHistoryClickedEvent
+ | FeaturePreviewsClickedEvent
+ | FeaturePreviewEnabledEvent
+ | FeaturePreviewDisabledEvent
// TODO remove this once all events are documented
| {
diff --git a/apps/studio/lib/constants/telemetry.ts b/apps/studio/lib/constants/telemetry.ts
index 9f7fda1fa0a..80b1d84c5b8 100644
--- a/apps/studio/lib/constants/telemetry.ts
+++ b/apps/studio/lib/constants/telemetry.ts
@@ -173,6 +173,24 @@ export interface FeaturePreviewsClickedEvent {
action: TelemetryActions.FEATURE_PREVIEWS_CLICKED
}
+/**
+ * A feature preview was enabled by the user through the FeaturePreviewModal.
+ *
+ * The FeaturePreviewModal can be opened clicking at the profile icon at the bottom left corner of the project sidebar.
+ *
+ * @group Events
+ * @source studio
+ */
+export interface FeaturePreviewEnabledEvent {
+ action: TelemetryActions.FEATURE_PREVIEW_ENABLED
+ properties: {
+ /**
+ * Feature key of the preview that was enabled. e.g. supabase-ui-api-side-panel
+ */
+ feature: string
+ }
+}
+
/**
* A feature preview was disabled by the user through the FeaturePreviewModal.
*