feat(analytics): implement advanced tracking with script-less smart proxy
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🧪 QA (push) Failing after 1m18s
Build & Deploy / 🏗️ Build (push) Failing after 2m58s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

- Added Umami Smart Proxy route handler
- Refactored Umami adapter to use proxy-based fetch
- Implemented TrackedButton, TrackedLink, and ScrollDepthTracker
- Integrated event tracking into ContactForm
- Enhanced Analytics component with manual pageview and performance tracking
This commit is contained in:
2026-02-16 23:03:42 +01:00
parent 7fd0c447bc
commit 2038b8fe47
13 changed files with 485 additions and 65 deletions

View File

@@ -12,6 +12,8 @@ interface ButtonProps {
size?: "normal" | "large";
className?: string;
showArrow?: boolean;
onClick?: (e: React.MouseEvent<any>) => void;
[key: string]: any;
}
/**
@@ -30,6 +32,8 @@ export const Button: React.FC<ButtonProps> = ({
size = "normal",
className = "",
showArrow = true,
onClick,
...props
}) => {
const [hovered, setHovered] = React.useState(false);
const [displayText, setDisplayText] = React.useState<string | null>(null);
@@ -153,14 +157,20 @@ export const Button: React.FC<ButtonProps> = ({
<a
href={href}
onClick={(e) => {
if (onClick) onClick(e);
e.preventDefault();
document.querySelector(href)?.scrollIntoView({ behavior: "smooth" });
}}
{...props}
>
{inner}
</a>
);
}
return <Link href={href}>{inner}</Link>;
return (
<Link href={href} onClick={onClick} {...props}>
{inner}
</Link>
);
};