
Make confident, data-driven decisions with actionable ad spend insights.
© 2026 DataCops. All rights reserved.
14 min read
Implementing the Conversions API (CAPI) is complex, and the transition from browser-based tracking to server-side requires meticulous testing. The most common failure point isn't the API connection itself, but the integrity and consistency of the data payload being sent, specifically the deduplication and the customer identifiers (CIPs). Debugging CAPI isn't like checking a pixel; you need to verify the server-side logic and the consistency of the Event ID.

Orla Gallagher
PPC & Paid Social Expert
Last Updated
December 15, 2025
The Problem: Your Facebook CAPI setup sends conversions to Meta but dashboard shows 135 conversions while backend has 100 actual orders (35% inflation). Event Match Quality score remains 5/10 (Low-Medium) in Events Manager. Cannot determine if deduplication working, if customer parameters captured correctly, or if payload structure valid. Testing shows both Pixel and CAPI events firing but unclear if counted once or twice.
The Reason: CAPI debugging requires three-layer verification (source Data Layer, server transformation, Meta destination) but 60-70% skip proper testing. Common failures: 30-40% have event_id mismatches causing double-counting, 50% missing customer parameters (email, phone, fbp) causing low Event Match Quality, 15-20% have malformed payloads rejected by Meta API. Each error compounds, creating 35-60% total conversion accuracy failures.
The Solution: Implement systematic three-layer CAPI debugging: (1) GTM Preview verifies Data Layer has event_id, value, currency before server, (2) Server-Side GTM Preview confirms event_id matches and PII hashed in payload, (3) Meta Test Events tool shows both Pixel and CAPI received with "Deduplicated" status. First-party unified system pre-validates all three layers automatically, achieving 95%+ debugging success vs 40-60% manual GTM.
CAPI debugging verifies Facebook Conversions API correctly sends conversion data from your server to Meta, checking deduplication, Event Match Quality, and payload structure.
What CAPI debugging verifies:
Deduplication success:
Both Pixel and CAPI events sent
Identical event_id in both
Meta counts conversion once (not twice)
Event Match Quality:
Customer parameters captured (email, phone)
Facebook identifiers included (fbp, fbc)
PII properly hashed (SHA-256)
Quality score 8+/10
Payload structure:
Required fields present (event_name, event_time)
Data types correct (value is number not string)
Format valid (currency ISO code)
No API rejection errors
Why debugging critical:
Undetected errors accumulate:
Deduplication fails: 35% inflation
Low Event Match Quality: Poor attribution
Payload errors: Conversions not sent
Combined: 40-60% total inaccuracy
Effective CAPI debugging requires checking data at three points: browser Data Layer, server transformation, and Meta destination.
Layer 1: Source (Browser/GTM Web)
Check Data Layer has correct data before server:
event_id present and unique
transaction_id included
value and currency correct format
Customer data available (email, phone)
Layer 2: Processing (Server-Side GTM)
Verify transformation and payload creation:
event_id passed from browser matches
PII hashed with SHA-256
fbp and fbc cookies included
User agent and IP captured
Layer 3: Destination (Meta Events Manager)
Confirm Meta receives and processes:
Both Pixel and CAPI events appear
Show "Deduplicated" status
Event Match Quality 8+/10
No 400/500 API errors
Why three layers necessary:
Each layer catches different errors:
Layer 1: Catches 40% (data collection failures)
Layer 2: Catches 30% (transformation errors)
Layer 3: Catches 30% (transmission/matching issues)
Skip any layer: Miss 30-40% of potential errors.
Use GTM Preview Mode to verify Data Layer populated correctly before data leaves browser for server.
Step 1: Enable GTM Preview
GTM Web Container > Preview button.
Opens debugging panel at bottom of website.
Trigger test conversion (purchase, lead submit).
Step 2: Check Data Layer variables
Click event in Preview panel (e.g., "Purchase").
View "Data Layer" tab.
Verify present:
event_id: "purchase_order_12345_1670145678" (unique)
transaction_id: "order_12345"
value: 89.99 (number not "$89.99" string)
currency: "USD" (ISO code)
email: "[email protected]" or pre-hashed
phone: "+1234567890" or pre-hashed
Step 3: Test event_id uniqueness
Trigger same event twice.
Compare event_id values.
Must be different each time.
If identical: Deduplication will fail (static ID issue).
Step 4: Check format correctness
value: Must be number (89.99) not string ("$89.99").
currency: Must be 3-letter ISO code ("USD" not "US Dollars").
event_id: Should include timestamp for uniqueness.
Common Layer 1 errors:
Missing event_id: 25% of implementations.
Wrong value format: 15% (string with $ symbol).
Static event_id: 20% (same ID every conversion).
Missing customer data: 30% (email/phone not in Data Layer).
Use Server-Side GTM Preview to verify transformation logic and payload structure before sending to Meta.
Step 1: Enable SS-GTM Preview
Server-Side GTM > Preview button.
Connect to web container's preview session.
Trigger test conversion.
Step 2: Check incoming request
Preview panel > "Incoming HTTP Request" section.
Verify data received from browser:
event_id present
Customer parameters (email, phone)
fbp cookie value
fbc click parameter
IP address (from headers)
User agent (from headers)
Step 3: Verify PII hashing
Preview panel > "Tags" tab > Select CAPI tag.
Check "Variables" section.
Customer parameters should show:
em: "a665a45..." (long hash, not plain email)
ph: "c3499c2..." (long hash, not plain phone)
If plain text visible: Hashing not working (CRITICAL ERROR).
Step 4: Confirm event_id consistency
Compare incoming event_id to outgoing CAPI payload event_id.
Must be IDENTICAL character-for-character.
If different: Deduplication will fail.
Step 5: Check CAPI payload structure
Preview panel > Tags > CAPI tag > "Outgoing Request".
Verify JSON structure:
{
"event_name": "Purchase",
"event_time": 1670145678,
"event_id": "purchase_order_12345_1670145678",
"user_data": {
"em": "SHA256_hash_here",
"ph": "SHA256_hash_here",
"fbp": "fb.1.1234567890.1234567890",
"fbc": "fb.1.1234567890.AbCdEfG",
"client_ip_address": "203.0.113.45",
"client_user_agent": "Mozilla/5.0..."
},
"custom_data": {
"value": 89.99,
"currency": "USD"
}
}
Common Layer 2 errors:
PII not hashed: 20% (privacy violation, Meta rejects).
event_id mismatch: 30% (transformation changed ID).
Missing fbp/fbc: 40% (low Event Match Quality).
Wrong data types: 10% (value as string not number).
Use Meta Test Events tool to verify both Pixel and CAPI received and deduplicated correctly.
Step 1: Generate test event code
Meta Events Manager > Data Sources > Your Pixel.
Test Events tab > Generate test event code.
Copy code: "TEST12345"
Step 2: Add code to CAPI tag
Server-Side GTM > CAPI tag configuration.
Add field: test_event_code = "TEST12345"
Publish container (temporary for testing).
Step 3: Trigger test conversion
Complete test purchase on website.
Watch Test Events tab in real-time.
Should see events appear within 5-10 seconds.
Step 4: Verify deduplication
Check for TWO events received:
One from "Browser" (Pixel)
One from "Server" (CAPI)
Status should show:
Event count increments by ONE (not two).
Step 5: Check Event Match Quality
Click on CAPI event in Test Events.
View "Event Match Quality" score.
Target: 8-10/10 (Good-Excellent).
If <6: Missing customer parameters.
Step 6: Remove test code
After testing complete, remove test_event_code.
Publish container for production.
Test events don't count in production reports.
What deduplication success looks like:
Pixel event received: 12:00:00.
CAPI event received: 12:00:02.
Status: "Deduplicated - matched to browser event"
Total count: 1 conversion (not 2).
What deduplication failure looks like:
Pixel event received: 12:00:00 (event_id: "abc123").
CAPI event received: 12:00:02 (event_id: "xyz789").
Status: Both counted separately.
Total count: 2 conversions (35% inflation).
Error Manifestation Root Cause Fix
Event counted twice Meta shows 135, backend 100 event_id mismatch between Pixel and CAPI Generate event_id once, use in both
Low Event Match Quality (3-5/10) Poor attribution accuracy Missing email, phone, fbp, fbc parameters Capture complete customer data before CAPI
Event not received (400 error) Nothing appears in Test Events Malformed payload or invalid Access Token Check Server GTM debug console for error details
Conversion value wrong Shows $0 or incorrect amount Value format wrong (string not number) or currency missing Ensure value is number, currency is ISO code
PII not hashed Meta rejects event SHA-256 hashing not applied Verify hash transformation in Server GTM
Test 1: Verify event_id in browser
GTM Web Preview > Purchase event.
Data Layer tab > Find event_id value.
Copy: "purchase_order_12345_1670145678"
Test 2: Verify event_id in Pixel
GTM Web Preview > Facebook Pixel tag.
Check eventID parameter.
Should match: "purchase_order_12345_1670145678"
Test 3: Verify event_id in server
Server GTM Preview > Incoming request.
Find event_id in request body.
Should match: "purchase_order_12345_1670145678"
Test 4: Verify event_id in CAPI payload
Server GTM Preview > CAPI tag > Outgoing request.
Find event_id in JSON payload.
Should match: "purchase_order_12345_1670145678"
Test 5: Verify in Meta Test Events
Trigger test purchase.
Check both Pixel and CAPI events in Test Events.
Both should show same event_id.
Status: "Deduplicated"
If any mismatch found:
Identify which layer changed event_id.
Fix transformation logic.
Retest all five steps.
Event Match Quality measures how well Meta can match server events to users, requiring complete customer parameters.
Check current score:
Meta Events Manager > Overview.
Event Match Quality section: _____/10.
Quality tiers:
9-10: Excellent (complete parameters)
7-8: Good (most parameters)
5-6: Medium (some parameters missing)
3-4: Low (many parameters missing)
1-2: Poor (almost no parameters)
Required parameters for 8+/10:
Essential (high value):
em (hashed email)
ph (hashed phone)
fbp (Facebook browser cookie)
fbc (Facebook click parameter)
Important (medium value):
client_ip_address
client_user_agent
external_id (customer ID)
If score <7, debug missing parameters:
Server GTM Preview > CAPI tag payload.
Check user_data object.
Identify missing fields.
Add to Data Layer and server transformation.
Pre-flight checks:
[ ] GTM Web Preview mode working
[ ] Server-Side GTM Preview accessible
[ ] Meta Test Events code generated
[ ] Test conversion path ready
Layer 1 (Browser) checks:
[ ] Data Layer has event_id
[ ] event_id unique each time tested
[ ] value is number format
[ ] currency is ISO code (USD, EUR)
[ ] Customer data present (email, phone)
Layer 2 (Server) checks:
[ ] event_id matches incoming to outgoing
[ ] PII shows as hashed (long strings)
[ ] fbp and fbc cookies included
[ ] IP address and user agent captured
[ ] Payload JSON valid structure
Layer 3 (Meta) checks:
[ ] Both Pixel and CAPI events received
[ ] Show "Deduplicated" status
[ ] Event count increments by 1 (not 2)
[ ] Event Match Quality 8+/10
[ ] No 400/500 errors in response
Check 1: Deduplication status
[ ] Trigger test conversion
[ ] Check Meta Test Events
[ ] Both Pixel and CAPI appear? Yes/No
[ ] Status shows "Deduplicated"? Yes/No
[ ] If No, event_id mismatch error
Check 2: Event Match Quality score
[ ] Meta Events Manager > Event Quality
[ ] Current score: _____/10
[ ] If <7, missing customer parameters
[ ] Target: 8+/10 for good attribution
Check 3: Conversion count accuracy
[ ] Meta reported conversions (30 days): _____
[ ] Backend actual orders: _____
[ ] Discrepancy: _____%
[ ] If >15%, debugging errors present
Check 4: Payload validation
[ ] Server GTM Preview > CAPI tag
[ ] Check for 400/500 errors
[ ] Verify all required fields present
[ ] Confirm data types correct
Check 5: PII hashing verification
[ ] Server GTM Preview > user_data
[ ] Email shows as hash (64 characters)? Yes/No
[ ] Phone shows as hash? Yes/No
[ ] If plain text, CRITICAL ERROR
What is CAPI debugging?
CAPI debugging verifies Facebook Conversions API correctly sends conversion data from server to Meta by checking three layers: browser Data Layer has event_id and customer data, Server-Side GTM transforms and hashes properly, Meta Test Events shows both Pixel and CAPI deduplicated. 30-40% of implementations have deduplication failures from event_id mismatches.
How do I test CAPI deduplication?
Test CAPI deduplication using Meta Events Manager Test Events tool. Generate test code, add to Server GTM CAPI tag, trigger conversion. Should see both Pixel (browser) and CAPI (server) events with identical event_id and "Deduplicated" status. Total count increases by 1 not 2. If counted separately, event_id mismatch causing 35% inflation.
What is Event Match Quality for CAPI?
Event Match Quality (1-10 score) measures how well Meta matches server conversions to users. Requires complete customer parameters: hashed email, phone, fbp cookie, fbc click ID, IP address, user agent. Score 8+/10 enables accurate attribution. Score <6 indicates missing parameters, debug Server GTM payload to identify gaps.
Why is my CAPI event not showing in Meta?
CAPI event not appearing indicates 400/500 API error from malformed payload or invalid Access Token. Check Server-Side GTM Preview debug console for error response details. Common causes: PII not hashed (plain text sent), wrong data types (value as string not number), missing required fields (event_name, event_time), expired token.
How do I verify PII hashing in CAPI?
Verify PII hashing in Server-Side GTM Preview mode. Tags tab > CAPI tag > Outgoing request payload. Check user_data object: em (email) and ph (phone) should show as 64-character SHA-256 hashes (e.g., "a665a45...") not plain text. If plain text visible, hashing transformation not working (privacy violation, Meta rejects).
What Event Match Quality score is good?
Good Event Match Quality score is 8-10/10 (Good-Excellent) enabling accurate conversion attribution. Score 7-8 acceptable but room for improvement. Score 5-6 (Medium) indicates missing customer parameters. Score <5 (Low-Poor) means majority parameters missing, cannot attribute accurately. Check Meta Events Manager to view current score and missing fields.
DataCops provides first-party analytics platform with built-in CAPI validation eliminating manual three-layer debugging by automatically verifying deduplication, Event Match Quality, and payload structure.
Automatic deduplication validation:
Unified system generates event_id once.
Sends identical ID to both Pixel and CAPI automatically.
Built-in verification: Monitors Meta deduplication status.
Alerts if any events counted twice.
Manual debugging: Test 5 steps across 3 layers.
DataCops: Automatic validation, 100% ID consistency.
Pre-validated payload structure:
All CAPI payloads validated before transmission:
Required fields present (event_name, event_time, event_id)
Data types correct (value as number, currency as ISO code)
Format valid (email/phone hashed SHA-256)
No malformed JSON errors
Meta receives: 100% valid payloads, 0% rejection errors.
Manual GTM: 15-20% payload errors require debugging.
Complete customer parameters:
First-party tracking captures for 95%+ users:
Email (hashed SHA-256 automatically)
Phone (hashed SHA-256 automatically)
fbp cookie (Facebook browser ID)
fbc parameter (Facebook click ID)
IP address (server-captured)
User agent (server-captured)
Event Match Quality: 8-9/10 (Good-Excellent) automatically.
Manual GTM: 5-6/10 average (missing parameters).
Real-time debugging dashboard:
Monitors conversion flow across all three layers:
Layer 1: Data Layer completeness (95%+ check rate)
Layer 2: Transformation validation (100% pre-send check)
Layer 3: Meta API responses (tracks 400/500 errors)
Alerts when issues detected:
Deduplication failure (event_id mismatch)
Event Match Quality drop (<7/10)
API rejection errors (payload invalid)
Manual: Check each layer separately, time-intensive.
DataCops: Unified monitoring, instant alerts.
Event Match Quality optimization:
Dashboard shows current score: _____/10.
Identifies missing parameters preventing 8+/10:
Missing fbp cookie (add first-party capture)
Missing email hash (capture at checkout)
Missing phone hash (add form field)
Automatic recommendations for improvement.
Manual: Guess which parameters missing, test repeatedly.
Debugging effort comparison:
Manual GTM debugging:
Layer 1: 15 min (GTM Web Preview testing)
Layer 2: 20 min (Server GTM Preview validation)
Layer 3: 15 min (Meta Test Events verification)
Total: 50 min per test cycle
Iterations: 3-5 cycles to fix all errors
Total time: 2.5-4 hours
DataCops automated:
All three layers validated automatically
Real-time monitoring (continuous)
Instant alerts when errors occur
Time to fix: 10-15 min (just address alert)
Implementation:
Week 1: CNAME DNS setup, first-party script deployment
Week 2: Automatic CAPI payload validation activation
Week 3: Event Match Quality monitoring setup
Week 4: Real-time debugging dashboard configuration
Ongoing: Zero manual debugging time, automatic validation
Platform automatically validates all three CAPI debugging layers (source, transformation, destination), achieving 95%+ deduplication success, 8-9/10 Event Match Quality, and 0% payload errors with no manual testing required.
Key Takeaways:
CAPI debugging requires three-layer verification: browser Data Layer, Server GTM transformation, Meta destination testing
30-40% of implementations have event_id mismatches causing deduplication failures and 35% conversion inflation
Event Match Quality score 8+/10 requires complete customer parameters (email, phone, fbp, fbc) captured for 95%+ users
Use Meta Test Events tool to verify both Pixel and CAPI events show "Deduplicated" status, counting once not twice
Check Server-Side GTM Preview to confirm PII hashed (64-character SHA-256 strings) not plain text (privacy violation)
Common errors: event_id changes during transformation (30%), missing customer parameters (50%), payload format wrong (15%)
Manual GTM debugging takes 2.5-4 hours per test cycle across 3 layers, first-party unified systems validate automatically
Event Match Quality <6/10 indicates missing parameters preventing accurate attribution, debug Server GTM payload to identify gaps