Skip to content

Commit

Permalink
Merge pull request osmosis-labs#819 from osmosis-labs/delivan/fix-amp…
Browse files Browse the repository at this point in the history
…litude-event

Fix Amplitude event name typo & Add an event to track
  • Loading branch information
jonator authored Sep 23, 2022
2 parents 3357216 + b08c867 commit 4504d2b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/web/components/trade-clipboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ export const TradeClipboard: FunctionComponent<{
logEvent([
EventName.Swap.slippageToleranceSet,
{
fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
toToken: tradeTokenInConfig.outCurrency.coinDenom,
isOnHome: !isInModal,
percentage: slippageConfig.slippage.toString(),
},
]);
Expand Down Expand Up @@ -544,6 +547,14 @@ export const TradeClipboard: FunctionComponent<{
Number(e.target.value) <= Number.MAX_SAFE_INTEGER &&
e.target.value.length <= (isMobile ? 19 : 26)
) {
logEvent([
EventName.Swap.inputEntered,
{
fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
toToken: tradeTokenInConfig.outCurrency.coinDenom,
isOnHome: !isInModal,
},
]);
tradeTokenInConfig.setAmount(e.target.value);
}
}}
Expand Down
3 changes: 2 additions & 1 deletion packages/web/config/user-analytics-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const EventName = {
pageViewed: "Swap: Page viewed",
maxClicked: "Swap: Max clicked",
halfClicked: "Swap: Half clicked",
inputEntered: "Swap: Input entered",
slippageToleranceSet: "Swap: Slippage tolerance set",
switchClicked: "Swap: Switch clicked",
swapStarted: "Swap: Swap started",
Expand Down Expand Up @@ -116,7 +117,7 @@ export const EventName = {
Assets: {
pageViewed: "Assets: Page viewed",
depositClicked: "Assets: Deposit clicked",
withdrawClicked: "Assets: Deposit clicked",
withdrawClicked: "Assets: Withdraw clicked",
myPoolsCardClicked: "Assets: My pools card clicked",
myPoolsMoreClicked: "Assets: My pools more clicked",
assetsListFiltered: "Assets: Assets list filtered",
Expand Down

0 comments on commit 4504d2b

Please sign in to comment.