diff --git a/src/components/TradeAssetSearch/hooks/CustomAssetAcknowledgement.tsx b/src/components/TradeAssetSearch/hooks/CustomAssetAcknowledgement.tsx index 4db13f87216..40b06c19fc5 100644 --- a/src/components/TradeAssetSearch/hooks/CustomAssetAcknowledgement.tsx +++ b/src/components/TradeAssetSearch/hooks/CustomAssetAcknowledgement.tsx @@ -19,6 +19,8 @@ import { WarningAcknowledgement } from 'components/Acknowledgement/Acknowledgeme import { AssetIcon } from 'components/AssetIcon' import { InlineCopyButton } from 'components/InlineCopyButton' import { useToggle } from 'hooks/useToggle/useToggle' +import { getMixPanel } from 'lib/mixpanel/mixPanelSingleton' +import { MixPanelEvent } from 'lib/mixpanel/types' import { middleEllipsis } from 'lib/utils' import { assets as assetsSlice } from 'state/slices/assetsSlice/assetsSlice' import { marketData as marketDataSlice } from 'state/slices/marketDataSlice/marketDataSlice' @@ -66,6 +68,10 @@ export const CustomAssetAcknowledgement: React.FC { if (!asset) return + getMixPanel()?.track(MixPanelEvent.CustomAssetAdded, { + asset, + }) + // Add asset to the store dispatch(assetsSlice.actions.upsertAsset(asset)) diff --git a/src/lib/mixpanel/types.ts b/src/lib/mixpanel/types.ts index 8e0874ec69f..0a33b12afa2 100644 --- a/src/lib/mixpanel/types.ts +++ b/src/lib/mixpanel/types.ts @@ -60,6 +60,7 @@ export enum MixPanelEvent { LpIncompleteDepositConfirm = 'LP Incomplete Deposit Confirm', LpIncompleteWithdrawPreview = 'LP Incomplete Withdraw Preview', LpIncompleteWithdrawConfirm = 'LP Incomplete Withdraw Confirm', + CustomAssetAdded = 'Custom Asset Added', } export type TrackOpportunityProps = {