feat(analytics): complete Rybbit tracking integration
Some checks failed
Build and Deploy / build (push) Has been cancelled

- Add Rybbit server-side tracking to analytics-server.ts for order completion and revenue
- Add trackNewsletterSignup to analytics.ts and wire up NewsletterSection
- Add cart tracking to CartDrawer (cart view, remove from cart)
- All ecommerce events now track to both OpenPanel and Rybbit
This commit is contained in:
Unchained
2026-03-31 05:53:53 +02:00
parent bbe618f22d
commit d4039c6e3b
4 changed files with 96 additions and 3 deletions

View File

@@ -4,14 +4,17 @@ import { motion } from "framer-motion";
import { useState } from "react";
import { useTranslations } from "next-intl";
import { ArrowRight } from "lucide-react";
import { useAnalytics } from "@/lib/analytics";
export default function NewsletterSection() {
const t = useTranslations("Newsletter");
const [email, setEmail] = useState("");
const [status, setStatus] = useState<"idle" | "success" | "error">("idle");
const { trackNewsletterSignup } = useAnalytics();
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
trackNewsletterSignup(email, "footer");
setStatus("success");
setEmail("");
};