Skip to content

Commit

Permalink
implementing event capture for swap page
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliiiu committed Jun 26, 2024
1 parent e908456 commit ec39b2d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/cards/PlatformCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -12,8 +13,16 @@ const PlatformCard = ({
icon: CustomIconType
route: string
}) => {
const posthog = usePostHog()
return (
<LinkBox onClick={() => console.log(name)}>
<LinkBox
onClick={() =>
posthog.capture('swap_platform_link_click', {
category: 'Swap',
target: name,
})
}
>
<Box w={{ base: '132', md: '176' }} textAlign="center">
<Box
h={{ base: '92', md: '122' }}
Expand Down

0 comments on commit ec39b2d

Please sign in to comment.