Meta Conversions API (CAPI) Setup Guide (2026): Pixel + Server-Side Tracking
Meta Conversions API (CAPI) sends conversion events from your server to Meta — recovering data lost to ad blockers, iOS App Tracking Transparency, and browser cookie restrictions. This guide covers setup, deduplication with the Pixel, and Nepal-specific tracking workflows.
→ CAPI dictionary · Meta Ads benchmarks Nepal · Facebook Ads Nepal
Why CAPI matters in 2026
| Problem | CAPI solution |
|---|---|
| iOS 14.5+ limits Pixel | Server-side events bypass ATT for matched users |
| Ad blockers | Server requests not blocked by browser extensions |
| Cookie expiry | Server can send hashed PII for matching |
| COD / offline sales | Import confirmed orders via API |
Without CAPI, Meta Ads Manager under-reports conversions → smart bidding optimizes toward wrong signals → ROAS looks worse than reality.
Architecture: Pixel + CAPI together
User converts on site
├── Browser: Meta Pixel fires (event_id: abc123)
└── Server: CAPI sends same event (event_id: abc123)
→ Meta deduplicates → counts once
Required: identical event_name and event_id on both paths.
Setup route 1: WooCommerce (fastest for Nepal e-commerce)
- Install Facebook for WooCommerce plugin (official Meta plugin)
- Connect Meta Business Manager + ad account
- Enable Conversions API in plugin settings (checkbox)
- Verify in Events Manager → Test Events
- Mark
Purchaseas conversion event in Ads Manager
Nepal tip: Map NPR currency correctly. Confirm Purchase fires on order status “Processing” or “Completed” — not on abandoned checkout.
Setup route 2: Google Tag Manager (flexible)
Client-side (web container)
- Meta Pixel template or custom HTML tag
- Fire on conversion pages with
event_idgenerated in Data Layer:dataLayer.push({ event: 'purchase', event_id: 'order_' + orderId, value: orderTotal, currency: 'NPR', });
Server-side (server container)
- Deploy GTM server container (Cloud Run, Stape, or similar)
- Configure Meta CAPI client in server container
- Pass hashed
em(email),ph(phone),external_idfrom Data Layer - Map
event_idfrom client tag to server tag
→ Server-Side Tracking · GA4 + GTM recipes
Setup route 3: Direct API / n8n automation
For CRM-led businesses (consultancies, B2B):
- On form submit → webhook to n8n
- n8n HTTP node → Meta Graph API
/events - Send
PurchaseorLeadwith hashed PII
Event Match Quality (EMQ)
Meta scores 0–10 how well events match user accounts. Improve EMQ by sending:
| Parameter | Format | Source |
|---|---|---|
em |
SHA-256 hashed email | Checkout / form |
ph |
SHA-256 hashed phone (E.164) | Checkout / form |
fn, ln
|
SHA-256 hashed name | Optional |
external_id |
Your customer ID | CRM / user ID |
client_ip_address |
Plain (not hashed) | Server |
client_user_agent |
Plain | Server |
Target EMQ 6.0+ for reliable optimization.
Standard events to implement
| Event | When | Priority |
|---|---|---|
PageView |
Every page | Auto (Pixel) |
ViewContent |
Product page | High |
AddToCart |
Add to cart | High |
InitiateCheckout |
Checkout start | High |
Purchase |
Order confirmed | Critical |
Lead |
Form submit | Critical (B2B) |
Nepal COD workflow
- Fire
InitiateCheckouton checkout start (Pixel + CAPI) - Fire
Purchaseonly on confirmed delivery or payment received — not on order placed - Weekly batch: upload confirmed COD orders via Offline Conversions or CAPI bulk import
- Use unique
event_idper order to prevent duplicates
Testing checklist
- Events Manager → Test Events shows Pixel events
-
Events Manager shows Server events with same
event_id - Deduplication working (not double-counting)
- EMQ score ≥ 6.0 on Purchase/Lead
- Ads Manager conversions match backend within 10–20%
Common mistakes
- CAPI without deduplication — inflated conversion counts break bidding
- Purchase on order placed, not confirmed — COD inflates ROAS
- No hashed email/phone — low EMQ, poor matching
- Only Pixel in 2026 — losing 20–40% of events on mobile
