Skip to content

Commit

Permalink
feat(mobile): track category name on transaction events (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Sep 17, 2024
1 parent 84a3055 commit b308578
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions apps/mobile/stores/transaction/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@ export function useCreateTransaction() {
posthog.capture('transaction_created', {
transaction_id: transaction.id,
transaction_amount: transaction.amount,
transaction_category_id: transaction.categoryId,
transaction_note: transaction.note,
transaction_wallet_account_id: transaction.walletAccountId,
transaction_budget_id: transaction.budgetId,
transaction_date: transaction.date,
transaction_category_id: transaction.categoryId,
transaction_category_name: category?.name,
transaction_category_type: categoryType,
transaction_currency: transaction.currency,
transaction_date: transaction.date,
transaction_note: transaction.note,
transaction_wallet_account_id: transaction.walletAccountId,
})

return transaction
Expand Down Expand Up @@ -335,13 +336,14 @@ export function useUpdateTransaction() {
posthog.capture('transaction_updated', {
transaction_id: transaction.id,
transaction_amount: transaction.amount,
transaction_category_id: transaction.categoryId,
transaction_note: transaction.note,
transaction_wallet_account_id: transaction.walletAccountId,
transaction_budget_id: transaction.budgetId,
transaction_date: transaction.date,
transaction_category_id: transaction.categoryId,
transaction_category_name: category?.name,
transaction_category_type: categoryType,
transaction_currency: transaction.currency,
transaction_date: transaction.date,
transaction_note: transaction.note,
transaction_wallet_account_id: transaction.walletAccountId,
})

return transaction
Expand Down

0 comments on commit b308578

Please sign in to comment.