feat(analytics): complete Rybbit tracking integration
Some checks failed
Build and Deploy / build (push) Has been cancelled
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:
@@ -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("");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user