diff --git a/web/components/add-funds-button.tsx b/web/components/add-funds-button.tsx index 14c9b063..90b24b2c 100644 --- a/web/components/add-funds-button.tsx +++ b/web/components/add-funds-button.tsx @@ -61,7 +61,7 @@ export function AddFundsButton(props: { className?: string }) { > diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index c483345c..705433b1 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -22,9 +22,9 @@ import { calculateDpmPayoutAfterCorrectBet, getDpmOutcomeProbabilityAfterBet, } from 'common/calculate-dpm' -import { firebaseLogin } from 'web/lib/firebase/users' import { Bet } from 'common/bet' import { track } from 'web/lib/service/analytics' +import { SignUpPrompt } from '../sign-up-prompt' export function AnswerBetPanel(props: { answer: Answer @@ -183,12 +183,7 @@ export function AnswerBetPanel(props: { {isSubmitting ? 'Submitting...' : 'Submit trade'} ) : ( - + )} ) diff --git a/web/components/answers/create-answer-panel.tsx b/web/components/answers/create-answer-panel.tsx index 6d9739cc..2a089f50 100644 --- a/web/components/answers/create-answer-panel.tsx +++ b/web/components/answers/create-answer-panel.tsx @@ -22,6 +22,7 @@ import { import { firebaseLogin } from 'web/lib/firebase/users' import { Bet } from 'common/bet' import { MAX_ANSWER_LENGTH } from 'common/answer' +import { withTracking } from 'web/lib/service/analytics' export function CreateAnswerPanel(props: { contract: FreeResponseContract }) { const { contract } = props @@ -143,7 +144,7 @@ export function CreateAnswerPanel(props: { contract: FreeResponseContract }) { isSubmitting && 'loading' )} disabled={!canSubmit} - onClick={submitAnswer} + onClick={withTracking(submitAnswer, 'submit answer')} > Submit answer & buy @@ -151,7 +152,7 @@ export function CreateAnswerPanel(props: { contract: FreeResponseContract }) { text && ( diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index e56be8b8..d9aee48a 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -26,6 +26,8 @@ import { EditCategoriesButton } from './feed/category-selector' import { CATEGORIES } from 'common/categories' import { Tabs } from './layout/tabs' import { EditFollowingButton } from './following-button' +import { track } from '@amplitude/analytics-browser' +import { trackCallback } from 'web/lib/service/analytics' const searchClient = algoliasearch( 'GJQPAYENIF', @@ -129,11 +131,13 @@ export function ContractSearch(props: { input: '!pl-10 !input !input-bordered shadow-none w-[100px]', resetIcon: 'mt-2 hidden sm:flex', }} + onBlur={trackCallback('search')} />