Feat: Add upgraded and failed event (#3683)
This commit is contained in:
@@ -199,12 +199,24 @@ export const useBillingActions = () => {
|
||||
type: ToastNotificationType.Danger,
|
||||
title: 'Your payment was canceled'
|
||||
})
|
||||
|
||||
mixpanel.track('Workspace Upgrade Cancelled', {
|
||||
// eslint-disable-next-line camelcase
|
||||
workspace_id: workspace.id
|
||||
})
|
||||
} else {
|
||||
triggerNotification({
|
||||
type: ToastNotificationType.Success,
|
||||
title: 'Your workspace plan was successfully updated'
|
||||
})
|
||||
|
||||
mixpanel.track('Workspace Upgraded', {
|
||||
plan: workspace.plan?.name,
|
||||
cycle: workspace.subscription?.billingInterval,
|
||||
// eslint-disable-next-line camelcase
|
||||
workspace_id: workspace.id
|
||||
})
|
||||
|
||||
if (import.meta.server) {
|
||||
await sendWebhook(defaultZapierWebhookUrl, {
|
||||
workspaceId: workspace.id,
|
||||
|
||||
Reference in New Issue
Block a user