mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
feat(studio): track usage on Project Settings: General (#54081)
## Problem Project Settings → General has almost no usage tracking. We can't tell how often users restart, pause, resume, or transfer projects from here. We also can't tell how often they copy the project ID or region, use the custom domain flow, or toggle high compliance mode. ## Solution Adds six PostHog events to `packages/common/telemetry-constants.ts`: `project_name_updated`, `project_settings_value_copied`, `project_lifecycle_action_submitted`, `project_compliance_mode_updated`, `custom_domain_step_submitted`, and `custom_domain_dns_record_copied`. Each event fires from the user's submit, confirm, copy, or toggle handler, never on render. Properties are only enums and booleans. No project names, domains, DNS record contents, or other typed values are sent. `ResumeProjectButton` is shared between settings and the paused-project home state, so it now takes a required `source` prop. The two call sites pass `settings_general` and `project_home`. Restart fires from the confirmation modal, with `restart_project` or `restart_database` depending on the chosen restart type. `DNSRecord` now types its `type` prop as `'CNAME' | 'TXT'`, so the copy event sends the record type as an enum. No `data-attr` attributes are added, because PostHog autocapture is off and they would not be collected. ## How to verify 1. On Project Settings → General, save a new project name. One `project_name_updated` event fires. 2. Copy the project ID, then the region. Each copy fires one `project_settings_value_copied` event, with `field` set to `projectRef` and then `region`. 3. Open the restart modal, then cancel it. No event fires. Confirm a restart (project or fast database reboot). One `project_lifecycle_action_submitted` fires with `action: restart_project` or `restart_database` and `source: settings_general`. 4. Confirm a pause, a resume, and a transfer. Each fires `project_lifecycle_action_submitted` with the matching `action`. A resume from settings sends `source: settings_general`; a resume from the paused project home page sends `source: project_home`. 5. Toggle high compliance mode. One `project_compliance_mode_updated` fires, with `isSensitive` set to the new value. 6. In the custom domain flow, Add, Verify, confirm Activate, and confirm Delete each fire `custom_domain_step_submitted` with `step` set to `configure`, `verify`, `activate`, and `remove`. 7. In the custom domain verification step, copy a DNS record's name, then its value. Each copy fires one `custom_domain_dns_record_copied` event, with `recordType` set to `CNAME` or `TXT` and `field` set to `name` and then `value`. ## Checks Ran `tsc --noEmit` in `apps/studio` and `packages/common`. Ran `eslint` (default config and `eslint.type-checks.config.cjs`) on the changed Studio files: no errors, only warnings that were already there. Ran `oxfmt --check` on all changed files. Ran `vitest run` on `General.test.tsx`, `Project.test.tsx`, `PauseProjectButton.test.tsx`, and `RestartServerButton.test.tsx`: all pass. ## Checklist - [x] I have read the [Contributing Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] I have checked that the change works in the preview deployment ## Feedback for Tedd To ask Tedd for a change to this PR, reply in Tedd's session on [FE-5029](https://linear.app/supabase/issue/FE-5029/track-usage-on-project-settings-general). Tedd doesn't read comments on this PR. --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
This commit is contained in:
1 parent
450939ce86
commit
e3684c034c
15 files changed
+204
-10
No files matched your search
@@ -134,6 +134,8 @@ Telemetry only runs for visitors who accepted analytics. Consent does not make i
|
||||
|
||||
## Required Pattern
|
||||
|
||||
**Never use `data-attr` (or any other `data-*` attribute) to send PostHog events.** Track every event with an explicit `track()` call from `useTrack`, defined in `packages/common/telemetry-constants.ts`. PostHog autocapture is off (`autocapture: false` in `packages/common/posthog-client.ts`), so a `data-attr` sends nothing, and it bypasses event typing and the review rules in this skill. A click you want measured gets a `track()` call. Don't add new `data-attr` attributes, and replace existing ones with `track()` when touching that code. Any that remain must keep a static string value, never built from user-defined names, in case autocapture is enabled later.
|
||||
|
||||
Import `useTrack` from `@/lib/telemetry/track` (within `apps/studio/`).
|
||||
|
||||
```typescript
|
||||
@@ -156,7 +158,6 @@ const MyComponent = () => {
|
||||
|
||||
Where the `track()` call goes:
|
||||
|
||||
- **`data-attr` is not tracking.** PostHog autocapture is off (`autocapture: false` in `packages/common/posthog-client.ts`), so the attribute sends nothing. A click you want measured gets a `track()` call. Keep any `data-attr` value a static string, never built from user-defined names, in case autocapture is enabled later.
|
||||
- **Mutation outcomes.** Don't track in the callbacks passed as the second argument to `mutate()` (`onSuccess`, `onError`): they are skipped if the component unmounts first. Track around `await mutateAsync()` (after it for success, in a `catch` for failure), or in the callbacks passed to the mutation hook itself (`useXMutation({ onSuccess, onError })`) when the hook always calls them: some return early, on a 202 for example. The selected project can change before the response arrives, so attribute the event to the mutation's own project or org (from its variables, or from the response for a create) with the third `track()` argument, for example `{ project: variables.projectRef }`.
|
||||
- **One meaning per event.** When one event name fires from several places, every call site fires on the same kind of user action, so the counts are comparable. Don't mix a `copy` event handler on a DOM element, which also fires on keyboard and partial-selection copies, with a Copy button's click callback under one event name: track the same action in both, or add a property that tells them apart.
|
||||
- **Submitted values.** Capture what the user submitted at submit time, not in the success callback. A form can stay editable while the request is in flight, so reading it on success can report a value that was not the one sent.
|
||||
@@ -230,7 +231,7 @@ When reviewing a PR, flag a break of any of these as a **required change**, even
|
||||
5. **Feature flags and experiment exposure**: [Feature Flag Measurement](#feature-flag-measurement)
|
||||
6. **User-defined names or identifiers in properties**: [Privacy: User-Defined Names and Identifiers](#privacy-user-defined-names-and-identifiers)
|
||||
7. **Secrets, project content, URL state or consent**: [Privacy: Secrets, Project Content and URL State](#privacy-secrets-project-content-and-url-state) and [Consent and Transport](#consent-and-transport)
|
||||
8. **Tracking placement**: the placement rules under [Required Pattern](#required-pattern)
|
||||
8. **Tracking placement**: the placement rules under [Required Pattern](#required-pattern), including no new `data-attr` or other `data-*` attribute used for tracking
|
||||
9. **Org-level events**: a project-scoped event reused on an organization-level page ([Event Definitions](#event-definitions))
|
||||
|
||||
When a PR adds user-facing interactions (buttons, forms, toggles, modals) **without** tracking, suggest:
|
||||
|
||||
@@ -36,6 +36,7 @@ import { FGA_PERMISSIONS, useAsyncCheckPermissionsV2 } from '@/hooks/misc/useChe
|
||||
import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
|
||||
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
|
||||
import { PROJECT_STATUS } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
const FormSchema = z.object({
|
||||
postgresVersionSelection: z.string(),
|
||||
@@ -46,6 +47,8 @@ type ResumeProjectButtonProps = Pick<
|
||||
'className' | 'size' | 'variant'
|
||||
> & {
|
||||
label?: string
|
||||
/** Where the button is rendered, sent with the resume telemetry event */
|
||||
source: 'settings_general' | 'project_layout_paused'
|
||||
}
|
||||
|
||||
export const ResumeProjectButton = ({
|
||||
@@ -53,8 +56,10 @@ export const ResumeProjectButton = ({
|
||||
label = 'Resume project',
|
||||
size,
|
||||
variant = 'default',
|
||||
source,
|
||||
}: ResumeProjectButtonProps) => {
|
||||
const router = useRouter()
|
||||
const track = useTrack()
|
||||
const { ref } = useParams()
|
||||
const { data: project } = useSelectedProjectQuery()
|
||||
const { data: selectedOrganization } = useSelectedOrganizationQuery()
|
||||
@@ -140,6 +145,8 @@ export const ResumeProjectButton = ({
|
||||
return toast.error('Unable to restore: project is required')
|
||||
}
|
||||
|
||||
track('project_lifecycle_action_submitted', { action: 'resume', source })
|
||||
|
||||
if (!newProjectInternalOnlyConfiguration) {
|
||||
return restoreProject({ ref: project.ref })
|
||||
}
|
||||
|
||||
+4
-1
@@ -19,9 +19,11 @@ import { useComplianceConfigUpdateMutation } from '@/data/config/project-complia
|
||||
import { useProjectSettingsV2Query } from '@/data/config/project-settings-v2-query'
|
||||
import { FGA_PERMISSIONS, useAsyncCheckPermissionsV2 } from '@/hooks/misc/useCheckPermissionsV2'
|
||||
import { DOCS_URL } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export const ComplianceConfig = () => {
|
||||
const { ref } = useParams()
|
||||
const track = useTrack()
|
||||
const isIssuesInboxEnabled = useFlag('issuesInbox')
|
||||
const [isSensitive, setIsSensitive] = useState(false)
|
||||
|
||||
@@ -40,7 +42,8 @@ export const ComplianceConfig = () => {
|
||||
|
||||
const { mutate: updateComplianceConfig, isPending: isSubmitting } =
|
||||
useComplianceConfigUpdateMutation({
|
||||
onSuccess: () => {
|
||||
onSuccess: (_data, vars) => {
|
||||
track('project_compliance_mode_updated', { isSensitive: vars.isSensitive })
|
||||
toast.success('Successfully updated project compliance configuration')
|
||||
},
|
||||
onError: (error) => {
|
||||
|
||||
+3
@@ -12,6 +12,7 @@ import { useCustomDomainActivateMutation } from '@/data/custom-domains/custom-do
|
||||
import { useCustomDomainDeleteMutation } from '@/data/custom-domains/custom-domains-delete-mutation'
|
||||
import type { CustomDomainResponse } from '@/data/custom-domains/custom-domains-query'
|
||||
import { DOCS_URL } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export type CustomDomainActivateProps = {
|
||||
projectRef?: string
|
||||
@@ -19,6 +20,7 @@ export type CustomDomainActivateProps = {
|
||||
}
|
||||
|
||||
export const CustomDomainActivate = ({ projectRef, customDomain }: CustomDomainActivateProps) => {
|
||||
const track = useTrack()
|
||||
const [isActivateConfirmModalVisible, setIsActivateConfirmModalVisible] = useState(false)
|
||||
|
||||
const { data: settings } = useProjectSettingsV2Query({ projectRef })
|
||||
@@ -43,6 +45,7 @@ export const CustomDomainActivate = ({ projectRef, customDomain }: CustomDomainA
|
||||
|
||||
const onActivateCustomDomain = async () => {
|
||||
if (!projectRef) return console.error('Project ref is required')
|
||||
track('custom_domain_step_submitted', { step: 'activate' })
|
||||
checkCNAMERecord(
|
||||
{ domain: customDomain.hostname },
|
||||
{ onSuccess: () => activateCustomDomain({ projectRef }) }
|
||||
|
||||
+3
@@ -10,6 +10,7 @@ import Panel from '@/components/ui/Panel'
|
||||
import { useCustomDomainDeleteMutation } from '@/data/custom-domains/custom-domains-delete-mutation'
|
||||
import type { CustomDomainResponse } from '@/data/custom-domains/custom-domains-query'
|
||||
import { DOCS_URL } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export type CustomDomainDeleteProps = {
|
||||
projectRef?: string
|
||||
@@ -17,6 +18,7 @@ export type CustomDomainDeleteProps = {
|
||||
}
|
||||
|
||||
export const CustomDomainDelete = ({ projectRef, customDomain }: CustomDomainDeleteProps) => {
|
||||
const track = useTrack()
|
||||
const [removeCustomDomain, setRemoveCustomDomain] = useState(false)
|
||||
const [isDeleteConfirmModalVisible, setIsDeleteConfirmModalVisible] = useState(false)
|
||||
|
||||
@@ -32,6 +34,7 @@ export const CustomDomainDelete = ({ projectRef, customDomain }: CustomDomainDel
|
||||
|
||||
const onDeleteCustomDomain = async () => {
|
||||
if (!projectRef) return console.error('Project ref is required')
|
||||
track('custom_domain_step_submitted', { step: 'remove' })
|
||||
deleteCustomDomain({ projectRef, removeAddon: removeCustomDomain })
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -15,9 +15,11 @@ import { useCustomDomainDeleteMutation } from '@/data/custom-domains/custom-doma
|
||||
import { useCustomDomainsQuery } from '@/data/custom-domains/custom-domains-query'
|
||||
import { useCustomDomainReverifyQuery } from '@/data/custom-domains/custom-domains-reverify-query'
|
||||
import { DOCS_URL } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export const CustomDomainVerify = () => {
|
||||
const { ref: projectRef } = useParams()
|
||||
const track = useTrack()
|
||||
|
||||
const { data: settings } = useProjectSettingsV2Query({ projectRef })
|
||||
|
||||
@@ -64,6 +66,7 @@ export const CustomDomainVerify = () => {
|
||||
|
||||
const onReverifyCustomDomain = () => {
|
||||
if (!projectRef) return console.error('Project ref is required')
|
||||
track('custom_domain_step_submitted', { step: 'verify' })
|
||||
refetchReverify()
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -23,6 +23,7 @@ import { useCheckCNAMERecordMutation } from '@/data/custom-domains/check-cname-m
|
||||
import { useCustomDomainCreateMutation } from '@/data/custom-domains/custom-domains-create-mutation'
|
||||
import { FGA_PERMISSIONS, useAsyncCheckPermissionsV2 } from '@/hooks/misc/useCheckPermissionsV2'
|
||||
import { DOCS_URL } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
const schema = z.object({
|
||||
domain: z.string().trim().min(1, 'A value for your custom domain is required'),
|
||||
@@ -30,6 +31,7 @@ const schema = z.object({
|
||||
|
||||
export const CustomDomainsConfigureHostname = () => {
|
||||
const { ref } = useParams()
|
||||
const track = useTrack()
|
||||
|
||||
const { mutate: checkCNAMERecord, isPending: isCheckingRecord } = useCheckCNAMERecordMutation()
|
||||
const { mutate: createCustomDomain, isPending: isCreating } = useCustomDomainCreateMutation()
|
||||
@@ -52,6 +54,7 @@ export const CustomDomainsConfigureHostname = () => {
|
||||
const onCreateCustomDomain = async (values: z.infer<typeof schema>) => {
|
||||
if (!ref) return console.error('Project ref is required')
|
||||
|
||||
track('custom_domain_step_submitted', { step: 'configure' })
|
||||
checkCNAMERecord(
|
||||
{ domain: values.domain.trim() },
|
||||
{
|
||||
|
||||
+23
-3
@@ -1,20 +1,40 @@
|
||||
import { Input } from 'ui-patterns/DataInputs/Input'
|
||||
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export type DNSRecordProps = {
|
||||
type: string
|
||||
type: 'CNAME' | 'TXT'
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export const DNSRecord = ({ type, name, value }: DNSRecordProps) => {
|
||||
const track = useTrack()
|
||||
|
||||
return (
|
||||
<div className="flex gap-4 items-center">
|
||||
<div className="w-[50px]">
|
||||
<p className="font-mono text-base">{type.toUpperCase()}</p>
|
||||
</div>
|
||||
|
||||
<Input readOnly copy containerClassName="flex-1" className="font-mono" value={name} />
|
||||
<Input readOnly copy containerClassName="flex-1" className="font-mono" value={value} />
|
||||
<Input
|
||||
readOnly
|
||||
copy
|
||||
containerClassName="flex-1"
|
||||
className="font-mono"
|
||||
value={name}
|
||||
onCopy={() => track('custom_domain_dns_record_copied', { recordType: type, field: 'name' })}
|
||||
/>
|
||||
<Input
|
||||
readOnly
|
||||
copy
|
||||
containerClassName="flex-1"
|
||||
className="font-mono"
|
||||
value={value}
|
||||
onCopy={() =>
|
||||
track('custom_domain_dns_record_copied', { recordType: type, field: 'value' })
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -28,9 +28,11 @@ import { useDeploymentMode } from '@/hooks/misc/useDeploymentMode'
|
||||
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
|
||||
import { DOCS_URL } from '@/lib/constants'
|
||||
import { useGrant } from '@/lib/grants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export const General = () => {
|
||||
const { ref } = useParams()
|
||||
const track = useTrack()
|
||||
const { data: project } = useSelectedProjectQuery()
|
||||
const isBranch = Boolean(project?.parent_project_ref)
|
||||
const entityLabel = isBranch ? 'Branch' : 'Project'
|
||||
@@ -77,12 +79,14 @@ export const General = () => {
|
||||
|
||||
const onSubmit = async (values: z.infer<typeof formSchema>) => {
|
||||
if (!project?.ref) return console.error('Ref is required')
|
||||
if (values.name.trim() === projectName) return
|
||||
|
||||
updateProject(
|
||||
{ ref: project.ref, name: values.name.trim() },
|
||||
{
|
||||
onSuccess: ({ name }) => {
|
||||
form.reset({ name })
|
||||
track('project_name_updated')
|
||||
toast.success('Successfully saved settings')
|
||||
},
|
||||
}
|
||||
@@ -227,7 +231,15 @@ export const General = () => {
|
||||
className="[&>div]:md:w-1/2 [&>div>div]:md:w-full"
|
||||
>
|
||||
<FormControl>
|
||||
<PasswordInput copy readOnly size="small" value={project.ref} />
|
||||
<PasswordInput
|
||||
copy
|
||||
readOnly
|
||||
size="small"
|
||||
value={project.ref}
|
||||
onCopied={() =>
|
||||
track('project_settings_value_copied', { field: 'projectRef' })
|
||||
}
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItemLayout>
|
||||
</CardContent>
|
||||
@@ -240,7 +252,13 @@ export const General = () => {
|
||||
className="[&>div]:md:w-1/2 [&>div>div]:md:w-full"
|
||||
>
|
||||
<FormControl>
|
||||
<PasswordInput copy readOnly size="small" value={project.region} />
|
||||
<PasswordInput
|
||||
copy
|
||||
readOnly
|
||||
size="small"
|
||||
value={project.region}
|
||||
onCopy={() => track('project_settings_value_copied', { field: 'region' })}
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItemLayout>
|
||||
</CardContent>
|
||||
|
||||
+3
@@ -25,9 +25,11 @@ import {
|
||||
useSelectedProjectQuery,
|
||||
} from '@/hooks/misc/useSelectedProject'
|
||||
import { PROJECT_STATUS } from '@/lib/constants'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export const PauseProjectButton = () => {
|
||||
const router = useRouter()
|
||||
const track = useTrack()
|
||||
const { data: project } = useSelectedProjectQuery()
|
||||
const { data: organization } = useSelectedOrganizationQuery()
|
||||
const { setProjectStatus } = useSetProjectStatus()
|
||||
@@ -61,6 +63,7 @@ export const PauseProjectButton = () => {
|
||||
if (!canPauseProject) {
|
||||
return toast.error(`You do not have the required permissions to pause this ${entityLabel}`)
|
||||
}
|
||||
track('project_lifecycle_action_submitted', { action: 'pause', source: 'settings_general' })
|
||||
pauseProject({ ref: projectRef })
|
||||
}
|
||||
|
||||
|
||||
+10
@@ -22,9 +22,11 @@ import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
|
||||
import { useIsProjectActive, useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
|
||||
import { PROJECT_STATUS } from '@/lib/constants'
|
||||
import type { StudioError } from '@/lib/errors/studio-errors'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
export const RestartServerButton = () => {
|
||||
const router = useRouter()
|
||||
const track = useTrack()
|
||||
const { data: project } = useSelectedProjectQuery()
|
||||
const isProjectActive = useIsProjectActive()
|
||||
|
||||
@@ -73,6 +75,10 @@ export const RestartServerButton = () => {
|
||||
if (!canRestartProject) {
|
||||
return toast.error('You do not have the required permissions to restart this project')
|
||||
}
|
||||
track('project_lifecycle_action_submitted', {
|
||||
action: 'restart_project',
|
||||
source: 'settings_general',
|
||||
})
|
||||
restartProject({ ref: projectRef })
|
||||
}
|
||||
|
||||
@@ -80,6 +86,10 @@ export const RestartServerButton = () => {
|
||||
if (!canRestartProject) {
|
||||
return toast.error('You do not have the required permissions to restart this project')
|
||||
}
|
||||
track('project_lifecycle_action_submitted', {
|
||||
action: 'restart_database',
|
||||
source: 'settings_general',
|
||||
})
|
||||
restartProjectServices({ ref: projectRef, region: projectRegion, services: ['postgresql'] })
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export const Project = () => {
|
||||
<Link href={`/project/${project?.ref}`}>View project dashboard</Link>
|
||||
</Button>
|
||||
) : (
|
||||
<ResumeProjectButton />
|
||||
<ResumeProjectButton source="settings_general" />
|
||||
)
|
||||
) : (
|
||||
<RestartServerButton />
|
||||
|
||||
+1
@@ -107,6 +107,7 @@ export const TransferProjectButton = () => {
|
||||
async function handleTransferProject() {
|
||||
if (project === undefined) return
|
||||
if (selectedOrg === undefined) return
|
||||
track('project_lifecycle_action_submitted', { action: 'transfer', source: 'settings_general' })
|
||||
transferProject({ projectRef, targetOrganizationSlug: selectedOrg })
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ export const ProjectPausedState = ({ product }: ProjectPausedStateProps) => {
|
||||
{isPauseStatusSuccess && !isRestoreDisabled && (
|
||||
<>
|
||||
<CardFooter className="flex flex-wrap justify-end items-center gap-2">
|
||||
<ResumeProjectButton size="tiny" variant="default" />
|
||||
<ResumeProjectButton size="tiny" variant="default" source="project_layout_paused" />
|
||||
|
||||
{isFreePlan ? (
|
||||
<UpgradePlanButton source="projectPausedStateRestore" />
|
||||
|
||||
@@ -2867,6 +2867,119 @@ export interface BranchDeleteButtonClickedEvent {
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a user saves a new project name in project settings.
|
||||
*
|
||||
* @group Events
|
||||
* @source studio
|
||||
* @page /dashboard/project/{ref}/settings/general
|
||||
*/
|
||||
export interface ProjectNameUpdatedEvent {
|
||||
action: 'project_name_updated'
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a user copies the project ID or region from project settings.
|
||||
*
|
||||
* @group Events
|
||||
* @source studio
|
||||
* @page /dashboard/project/{ref}/settings/general
|
||||
*/
|
||||
export interface ProjectSettingsValueCopiedEvent {
|
||||
action: 'project_settings_value_copied'
|
||||
properties: {
|
||||
/**
|
||||
* The field that was copied
|
||||
*/
|
||||
field: 'projectRef' | 'region'
|
||||
}
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a user confirms a project lifecycle action: a full project restart, a fast
|
||||
* database reboot, a pause, a resume, or a transfer to another organization.
|
||||
*
|
||||
* @group Events
|
||||
* @source studio
|
||||
* @page /dashboard/project/{ref}/settings/general or /dashboard/project/{ref} (resume from the paused project state)
|
||||
*/
|
||||
export interface ProjectLifecycleActionSubmittedEvent {
|
||||
action: 'project_lifecycle_action_submitted'
|
||||
properties: {
|
||||
/**
|
||||
* The lifecycle action the user confirmed
|
||||
*/
|
||||
action: 'restart_project' | 'restart_database' | 'pause' | 'resume' | 'transfer'
|
||||
/**
|
||||
* Where the action was confirmed from
|
||||
*/
|
||||
source: 'settings_general' | 'project_layout_paused'
|
||||
}
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a user toggles the high compliance (sensitive data) mode of a project.
|
||||
*
|
||||
* @group Events
|
||||
* @source studio
|
||||
* @page /dashboard/project/{ref}/settings/general
|
||||
*/
|
||||
export interface ProjectComplianceModeUpdatedEvent {
|
||||
action: 'project_compliance_mode_updated'
|
||||
properties: {
|
||||
/**
|
||||
* Whether the project is marked as storing sensitive data after the toggle
|
||||
*/
|
||||
isSensitive: boolean
|
||||
}
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a user submits a step of the custom domain flow: adding the hostname,
|
||||
* verifying its DNS records, activating it, or deleting the active custom domain.
|
||||
*
|
||||
* @group Events
|
||||
* @source studio
|
||||
* @page /dashboard/project/{ref}/settings/general
|
||||
*/
|
||||
export interface CustomDomainStepSubmittedEvent {
|
||||
action: 'custom_domain_step_submitted'
|
||||
properties: {
|
||||
/**
|
||||
* The step of the custom domain flow that was submitted
|
||||
*/
|
||||
step: 'configure' | 'verify' | 'activate' | 'remove'
|
||||
}
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a user copies the name or value of a DNS record shown in the custom domain
|
||||
* verification step.
|
||||
*
|
||||
* @group Events
|
||||
* @source studio
|
||||
* @page /dashboard/project/{ref}/settings/general
|
||||
*/
|
||||
export interface CustomDomainDnsRecordCopiedEvent {
|
||||
action: 'custom_domain_dns_record_copied'
|
||||
properties: {
|
||||
/**
|
||||
* The type of DNS record that was copied
|
||||
*/
|
||||
recordType: 'CNAME' | 'TXT'
|
||||
/**
|
||||
* Whether the record name or the record value was copied
|
||||
*/
|
||||
field: 'name' | 'value'
|
||||
}
|
||||
groups: TelemetryGroups
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered when a create merge request is clicked for a branch.
|
||||
*
|
||||
@@ -5342,6 +5455,12 @@ export type TelemetryEvent =
|
||||
| StorageBucketLifecycleRuleRemovedEvent
|
||||
| BranchCreateButtonClickedEvent
|
||||
| BranchDeleteButtonClickedEvent
|
||||
| ProjectNameUpdatedEvent
|
||||
| ProjectSettingsValueCopiedEvent
|
||||
| ProjectLifecycleActionSubmittedEvent
|
||||
| ProjectComplianceModeUpdatedEvent
|
||||
| CustomDomainStepSubmittedEvent
|
||||
| CustomDomainDnsRecordCopiedEvent
|
||||
| BranchCreateMergeRequestButtonClickedEvent
|
||||
| BranchCloseMergeRequestButtonClickedEvent
|
||||
| BranchMergeSubmittedEvent
|
||||
|
||||
Reference in new issue
Block a user