Skip to content

Commit

Permalink
feat: added swap source to swap amplitude events
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Sep 10, 2024
1 parent 15df9a9 commit e343801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/web/components/swap-tool/alt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export const AltSwapTool: FunctionComponent<SwapToolProps> = observer(
feeValueUsd: Number(swapState.totalFee?.toString() ?? "0"),
page,
quoteTimeMilliseconds: swapState.quote?.timeMs,
swapSource: "swap" as "swap" | "market",
};
logEvent([EventName.Swap.swapStarted, baseEvent]);
setIsSendingTx(true);
Expand Down
1 change: 1 addition & 0 deletions packages/web/config/analytics-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export type EventProperties = {
isRecommendedVariant: boolean;
walletName: string;
transferDirection: "deposit" | "withdraw";
swapSource: "market" | "swap";
};

export type UserProperties = {
Expand Down
1 change: 1 addition & 0 deletions packages/web/hooks/limit-orders/use-place-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export const usePlaceLimit = ({
feeValueUsd: Number(marketState.totalFee?.toString() ?? "0"),
page,
quoteTimeMilliseconds: marketState.quote?.timeMs,
swapSource: "market" as "swap" | "market",
};
try {
logEvent([EventName.Swap.swapStarted, baseEvent]);
Expand Down

0 comments on commit e343801

Please sign in to comment.