From 597b208c28a41c9c3cfde560ca98b484829e4725 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Wed, 24 Aug 2022 09:04:52 -0600 Subject: [PATCH] Add tracking --- web/components/follow-market-button.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/components/follow-market-button.tsx b/web/components/follow-market-button.tsx index 92803d6c..82397339 100644 --- a/web/components/follow-market-button.tsx +++ b/web/components/follow-market-button.tsx @@ -10,6 +10,7 @@ import clsx from 'clsx' import { User } from 'common/user' import { useContractFollows } from 'web/hooks/use-follows' import { firebaseLogin } from 'web/lib/firebase/users' +import { track } from 'web/lib/service/analytics' export const FollowMarketButton = (props: { contract: Contract @@ -29,11 +30,17 @@ export const FollowMarketButton = (props: { toast('Notifications from this market are now silenced.', { icon: , }) + track('Unfollow Market', { + slug: contract.slug, + }) } else { await followContract(contract.id, user.id) toast('You are now following this market!', { icon: , }) + track('Follow Market', { + slug: contract.slug, + }) } }} >