File tree Expand file tree Collapse file tree
features/settings/components/UserSettings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import toast from 'react-simple-toasts'
33import { Button , ConfirmModal } from 'src/components/Elements'
44import { useAuth } from 'src/features/auth'
55import { useDeleteAccount } from 'src/features/auth/api/deleteAccount'
6+ import { trackUserDelete } from 'src/lib/analytics'
67
78export const DeleteAccount = ( ) => {
89 const deleteAccountMutation = useDeleteAccount ( )
@@ -20,6 +21,7 @@ export const DeleteAccount = () => {
2021 } )
2122 . then ( ( ) => {
2223 logout ( )
24+ trackUserDelete ( )
2325 toast ( 'Account deleted successfully' , { theme : 'successToast' } )
2426 } )
2527 . catch ( ( ) => {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ enum Verbs {
4646 COPY = 'Copy' ,
4747 CONNECT = 'Connect' ,
4848 DISCONNECT = 'Disconnect' ,
49+ DELETE = 'Delete' ,
4950}
5051
5152export enum Attributes {
@@ -394,6 +395,13 @@ export const trackUserDisconnect = () => {
394395 } )
395396}
396397
398+ export const trackUserDelete = ( ) => {
399+ trackEvent ( {
400+ object : Objects . USER ,
401+ verb : Verbs . DELETE ,
402+ } )
403+ }
404+
397405// Identification
398406
399407export const identifyUserLanguages = ( languages : string [ ] ) => {
You can’t perform that action at this time.
0 commit comments