From ec39b2d697181423c4c2ce21546e2f078182ee98 Mon Sep 17 00:00:00 2001 From: Aliu Salaudeen Date: Wed, 26 Jun 2024 13:47:25 +0100 Subject: [PATCH] implementing event capture for swap page --- src/components/cards/PlatformCard.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/cards/PlatformCard.tsx b/src/components/cards/PlatformCard.tsx index b59f3488..18f9ca72 100644 --- a/src/components/cards/PlatformCard.tsx +++ b/src/components/cards/PlatformCard.tsx @@ -2,6 +2,7 @@ import React from 'react' import { Box, Icon, LinkBox, Text } from '@chakra-ui/react' import { CustomIconType } from '@/data/SidebarData' import LinkOverlay from '../elements/LinkElements/LinkOverlay' +import { usePostHog } from 'posthog-js/react' const PlatformCard = ({ icon, @@ -12,8 +13,16 @@ const PlatformCard = ({ icon: CustomIconType route: string }) => { + const posthog = usePostHog() return ( - console.log(name)}> + + posthog.capture('swap_platform_link_click', { + category: 'Swap', + target: name, + }) + } + >