From 9203dca890391f2b89d86f82e3d65d132f46286b Mon Sep 17 00:00:00 2001 From: AI Studio Assistant Date: Sat, 9 May 2026 18:08:38 +0000 Subject: [PATCH] feat: adiciona meta pixel e eventos viewcontent, initiatecheckout e purchase --- index.html | 8 +++++--- src/components/CTA.tsx | 10 +++++++++- src/components/Hero.tsx | 10 +++++++++- src/components/StickyMobileCTA.tsx | 5 +++++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index dbf4e0f..e476ad6 100644 --- a/index.html +++ b/index.html @@ -103,6 +103,7 @@ t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); + fbq('init', '1494357542144348'); fbq('track', 'PageView'); @@ -111,9 +112,10 @@ - + diff --git a/src/components/CTA.tsx b/src/components/CTA.tsx index 8943b9b..ed158f7 100644 --- a/src/components/CTA.tsx +++ b/src/components/CTA.tsx @@ -17,7 +17,15 @@ export default function CTA() {

- + { + if (typeof window !== 'undefined' && 'fbq' in window) { + (window as any).fbq('track', 'InitiateCheckout'); + } + }} + className="h-16 px-12 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 text-white font-bold text-xl flex items-center justify-center gap-3 hover:scale-105 transition-all shadow-[0_0_40px_rgba(236,72,153,0.5)]" + > Criar Minha Festa Agora diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index 6582905..8f1beee 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -58,7 +58,15 @@ export default function Hero() { transition={{ duration: 0.5, delay: 0.4 }} className="flex flex-col sm:flex-row items-center gap-4 w-full justify-center lg:justify-start" > - + { + if (typeof window !== 'undefined' && 'fbq' in window) { + (window as any).fbq('track', 'InitiateCheckout'); + } + }} + className="w-full sm:w-auto h-16 px-10 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 text-white font-bold text-xl flex items-center justify-center gap-3 hover:scale-105 hover:shadow-2xl transition-all shadow-xl shadow-pink-500/30" + > Criar Minha Festa Agora
diff --git a/src/components/StickyMobileCTA.tsx b/src/components/StickyMobileCTA.tsx index 729bd36..48da775 100644 --- a/src/components/StickyMobileCTA.tsx +++ b/src/components/StickyMobileCTA.tsx @@ -32,6 +32,11 @@ export default function StickyMobileCTA() { > { + if (typeof window !== 'undefined' && 'fbq' in window) { + (window as any).fbq('track', 'InitiateCheckout'); + } + }} className="w-full h-14 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 text-white font-bold text-lg flex items-center justify-center gap-2 shadow-[0_10px_40px_-10px_rgba(236,72,153,0.8)] border border-white/20 active:scale-95 transition-transform" > Criar Minha Festa