feat(analytics): add behavior and payment funnel tracking
This commit is contained in:
@@ -6,6 +6,7 @@ import Link, { type LinkProps } from "next/link";
|
||||
interface BackButtonBaseProps {
|
||||
className?: string;
|
||||
ariaLabel?: string;
|
||||
analyticsKey?: string;
|
||||
iconSize?: number;
|
||||
variant?: "floating" | "soft" | "ghost" | "dark";
|
||||
}
|
||||
@@ -41,6 +42,7 @@ export function BackButton({
|
||||
onClick,
|
||||
className,
|
||||
ariaLabel = "Back",
|
||||
analyticsKey,
|
||||
iconSize = 24,
|
||||
variant = "floating",
|
||||
}: BackButtonProps) {
|
||||
@@ -57,7 +59,13 @@ export function BackButton({
|
||||
|
||||
if (href) {
|
||||
return (
|
||||
<Link href={href} className={buttonClassName} aria-label={ariaLabel}>
|
||||
<Link
|
||||
href={href}
|
||||
className={buttonClassName}
|
||||
aria-label={ariaLabel}
|
||||
data-analytics-key={analyticsKey}
|
||||
data-analytics-label={ariaLabel}
|
||||
>
|
||||
{icon}
|
||||
</Link>
|
||||
);
|
||||
@@ -69,6 +77,8 @@ export function BackButton({
|
||||
className={buttonClassName}
|
||||
onClick={onClick}
|
||||
aria-label={ariaLabel}
|
||||
data-analytics-key={analyticsKey}
|
||||
data-analytics-label={ariaLabel}
|
||||
>
|
||||
{icon}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user