'use client'; import { sendGAEvent } from '@/app/utils/analytics'; interface TrackedLinkProps extends React.AnchorHTMLAttributes { event: string; } // An outbound link that sends a Google Analytics event when clicked // (only for visitors who allowed analytics). export default function TrackedLink({ event, onClick, ...props }: TrackedLinkProps) { return ( { sendGAEvent(event); onClick?.(clickEvent); }} /> ); }