From a8b874a32ff73c9b21d33f95a936f2c880f7b6b7 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 21 Jun 2022 10:36:44 -0500 Subject: [PATCH] track comment tips --- web/components/tipper.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/components/tipper.tsx b/web/components/tipper.tsx index 6c5a2555..3b4d3603 100644 --- a/web/components/tipper.tsx +++ b/web/components/tipper.tsx @@ -12,6 +12,7 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { CommentTips } from 'web/hooks/use-tip-txns' import { useUser } from 'web/hooks/use-user' import { transact } from 'web/lib/firebase/fn-call' +import { track } from 'web/lib/service/analytics' import { Row } from './layout/row' import { Tooltip } from './tooltip' @@ -64,6 +65,14 @@ export function Tipper(prop: { comment: Comment; tips: CommentTips }) { }, description: `${user.name} tipped M$ ${change} to ${comment.userName} for a comment`, }) + + track('send comment tip', { + contractId: comment.contractId, + commentId: comment.id, + amount: change, + fromId: user.id, + toId: comment.userId, + }) }, 1500) ) // instant save on unrender