Skip to content

Commit baaf070

Browse files
authored
chore(studio): add method property to integration installation events (supabase#45473)
Add new `method` property to existing event to distinguish from server-side emitted events
1 parent bb8fc82 commit baaf070

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,11 @@ const TEMPLATE_INTEGRATIONS: Array<IntegrationDefinition> = [
584584
const startTime = Date.now()
585585
await installStripeSync({ projectRef, startTime, stripeSecretKey: stripe_api_key as string })
586586

587-
if (track) track('integration_install_submitted', { integrationName: 'stripe_sync_engine' })
587+
if (track)
588+
track('integration_install_submitted', {
589+
integrationName: 'stripe_sync_engine',
590+
method: 'template',
591+
})
588592

589593
const queryClient = getQueryClient()
590594
await queryClient.invalidateQueries({ queryKey: stripeSyncKeys.all })

apps/studio/data/database-integrations/stripe/stripe-sync-install-mutation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const useStripeSyncInstallMutation = ({
6868

6969
track('integration_install_submitted', {
7070
integrationName: 'stripe_sync_engine',
71+
method: 'template',
7172
})
7273

7374
// Invalidate schemas query to refresh installation status

packages/common/telemetry-constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,10 +2928,10 @@ export interface IntegrationInstallCompletedEvent {
29282928
export interface IntegrationInstallSubmittedEvent {
29292929
action: 'integration_install_submitted'
29302930
properties: {
2931-
/**
2932-
* The name of the integration being installed
2933-
*/
2931+
/** The name of the integration being installed */
29342932
integrationName: string
2933+
/** The integration method (will be 'template' for frontend-driven integrations.) */
2934+
method: string
29352935
}
29362936
groups: TelemetryGroups
29372937
}

0 commit comments

Comments
 (0)