Skip to content

Commit

Permalink
extending autocapture event property for exchange links
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliiiu committed Jun 27, 2024
1 parent 6ac9c1e commit 5453b43
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/dashboard/Exchanges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { OneInch } from '../icons/1inch'
import { Upbit } from '../icons/Upbit'
import ArrowIcon from '../icons/arrow'
import { Fraxswap } from '../icons/fraxswap'
import { usePostHog } from 'posthog-js/react'

interface IconButtonProps {
href: string
Expand All @@ -22,18 +21,11 @@ const ExchangeLink: React.FC<IconButtonProps> = ({
icon,
ariaLabel,
}) => {
const posthog = usePostHog()

return (
<Link
href={href}
target="_blank"
onClick={() => {
posthog.capture('exchange_link_click', {
category: 'Dashboard',
target: logEventLabel,
})
}}
data-ph-capture-attribute-exchange_link_click={logEventLabel}
>
<IconButton
variant="outline"
Expand Down

0 comments on commit 5453b43

Please sign in to comment.