Pixel + CAPI dedup: cómo hacerlo correctamente
Sin dedup, Meta cuenta cada conversión 2 veces y tu ROAS reportado es 2x el real. Con dedup mal hecho, perdés conversiones server-side. Acá el setup matched.
TL;DR
- Pixel + CAPI sin dedup → conversiones duplicadas → ROAS inflado.
- Dedup requiere event_id matching: mismo UUID en Pixel JS y server.
- Validá en Test Events: "match" verde = OK.
Cómo funciona el dedup
Meta dedup events si encuentra: - Mismo `event_name` (ej: Purchase). - Mismo `event_id` (UUID que vos generás). - Misma ventana temporal (~24h).
Si Pixel envía Purchase con event_id=abc123 y CAPI envía Purchase con event_id=abc123 dentro de 24h → cuenta 1.
Implementación correcta
Frontend (Pixel): ```js const eventId = crypto.randomUUID(); fbq('track', 'Purchase', { value: 99.00, currency: 'USD', }, { eventID: eventId }); // Pasá eventId al backend para que CAPI lo use ```
Backend (CAPI): ```js fetch('https://graph.facebook.com/v21.0/PIXEL_ID/events', { method: 'POST', body: JSON.stringify({ data: [{ event_name: 'Purchase', event_time: Math.floor(Date.now() / 1000), event_id: eventId, // mismo UUID action_source: 'website', user_data: { em: hashedEmail, ph: hashedPhone, ... }, custom_data: { value: 99, currency: 'USD' }, }], access_token: PROCESS.ENV.CAPI_TOKEN, }), }); ```
Validación
- Test Events tab → buscá tu evento → verificá "Server" Y "Browser" con mismo event_id.
- Verde = match. Amarillo = duplicado o desincronizado.
FAQ
¿Por qué Test Events muestra solo Server? Pixel bloqueado por adblock — agregá fallback CAPI. ¿Si pierdo el event_id antes del CAPI? Generalo con hash determinístico (order_id + timestamp) para regenerar. ¿CAPI sin Pixel funciona? Sí, pero perdés signal client-side rico (UTMs, behaviour).
KANDIMA setupea Pixel + CAPI con dedup automático en 5 min via webhook Stripe.
Probá KANDIMA con tu cuenta.
100 créditos gratis al registrarte.
Sin tarjeta. Sin trial. La plataforma es 100% gratis — solo pagás IA por uso. Conectá Shopify / Tienda Nube / Mercado Libre / Meta / Google / TikTok en un click.