feat: send only required details in billingevents (#4587)

This commit is contained in:
Yunus M 2024-02-23 22:53:09 +05:30 committed by GitHub
parent fe37a2e7e0
commit 17de5836bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@ import useAnalytics from 'hooks/analytics/useAnalytics';
import useAxiosError from 'hooks/useAxiosError'; import useAxiosError from 'hooks/useAxiosError';
import useLicense from 'hooks/useLicense'; import useLicense from 'hooks/useLicense';
import { useNotifications } from 'hooks/useNotifications'; import { useNotifications } from 'hooks/useNotifications';
import { pick } from 'lodash-es';
import { useCallback, useEffect, useState } from 'react'; import { useCallback, useEffect, useState } from 'react';
import { useMutation, useQuery } from 'react-query'; import { useMutation, useQuery } from 'react-query';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
@ -305,7 +306,7 @@ export default function BillingContainer(): JSX.Element {
const handleBilling = useCallback(async () => { const handleBilling = useCallback(async () => {
if (isFreeTrial && !licensesData?.payload?.trialConvertedToSubscription) { if (isFreeTrial && !licensesData?.payload?.trialConvertedToSubscription) {
trackEvent('Billing : Upgrade Plan', { trackEvent('Billing : Upgrade Plan', {
user, user: pick(user, ['email', 'userId', 'name']),
org, org,
}); });
@ -316,7 +317,7 @@ export default function BillingContainer(): JSX.Element {
}); });
} else { } else {
trackEvent('Billing : Manage Billing', { trackEvent('Billing : Manage Billing', {
user, user: pick(user, ['email', 'userId', 'name']),
org, org,
}); });