Meta Conversions API (CAPI) Event Match Quality Diagnostic & Normaliser
Interactive normalisation tool for Meta CAPI customer parameters. Normalise phone numbers to E.164, inspect SHA-256 hashes, and predict Event Match Quality scores.
Meta Conversions API Match Quality Architecture
Visualizes user data parameter hashing, client-side cookie preservation (_fbp/_fbc), and server-side payload structuring to maximize Event Match Quality (EMQ >= 8.5/10.0).
Meta Conversions API (CAPI) Event Match Quality Diagnostic & Normaliser Configurator
Meta Conversions API (CAPI) — Event Match Quality (EMQ) Diagnostic
Full-funnel customer parameter normalization, SHA-256 cryptographic hashing, and EMQ scoring for Meta server-side conversion hits.
1 Input Parameters & Assumptions
| Parameter | Value | Context & Provenance |
|---|---|---|
| Customer Email | user@example.com Weight: 3.5 pts | Primary CRM match identifier |
| Mobile Phone | 0412 345 678 Weight: 2.5 pts | Normalized to E.164 (+61412345678) before SHA-256 hashing |
| Meta Browser Cookie (_fbp) | fb.1.1718000000000.123456789 Weight: 1.5 pts | First-party browser cookie identifier |
| Meta Click ID (_fbc) | fb.1.1718000000000.IwAR2... Weight: 1.0 pts | Ad click attribution correlation key |
| Client IP & User Agent | 203.0.113.195 Weight: 1.0 pts | Server-side device fingerprinting parameters |
| External Customer ID | CRM_98412 Weight: 0.5 pts | Deterministic CRM loyalty/account identifier |
2 Explicit Mathematical Formula
EMQ Scoring Weight Formula:
Email Address (em): Present (3.5 pts) -> SHA-256 normalized
Phone Number (ph): Present (2.5 pts) -> E.164 +61412345678 -> SHA-256
Browser Cookie (_fbp): Present (1.5 pts) -> fb.1.1718000000000.123456789
Click ID (_fbc): Present (1.0 pts) -> fb.1.1718000000000.IwAR2_test_click_id
Client IP & User Agent: Present (1.0 pts) -> 203.0.113.195 + Chrome UA
External ID (external_id): Present (0.5 pts) -> CRM_98412
Total EMQ Score = 3.5 + 2.5 + 1.5 + 1.0 + 1.0 + 0.5 = 10.0 / 10.0 (Rating: EXCELLENT >= 8.0)3 Computed Output Metrics
| Computed Metric | Result | Interpretation & Threshold |
|---|---|---|
| Event Match Quality (EMQ) | 10.0 / 10.0 EMQ Score | Maximum possible match fidelity score across all 6 parameter categories |
| EMQ Match Rating | EXCELLENT Quality Tier | Score >= 8.0 qualifies for optimal Meta delivery algorithm conversion attribution |
| Payload Cryptography | SHA-256 Verified Hashing | All PII fields strictly lowercased, trimmed, and hashed into 64-character hex digests |
Meta Conversions API (CAPI) Event Match Quality Diagnostic & Normaliser — Scope & Limitations
Explicit operational boundaries and constraints defining target use cases and out-of-scope scenarios.
Built For (Target Use Cases)
- Estimating a Meta Conversions API Event Match Quality score from 6 weighted customer-data fields.
- Normalising Australian and 10-digit local phone numbers to E.164 format before hashing.
- Previewing SHA-256 hashed output for email, phone, and name fields before sending to Meta.
Not Built For (Limitations & Out-of-Scope)
- Verifying that a phone or email actually belongs to a real, reachable customer.
- Sending the hashed payload to Meta's Conversions API; this tool only previews the hash locally.
- Validating phone numbers for countries outside the built-in Australian and 10-digit local number rules.
Operational Assumptions & Defaults
- Any phone value of 8 or more characters is scored as present; format is not checked.
- Email presence is judged only by an '@' character and length over 3, not full format.
- Weightings (3.5/2.5/1.5/1.0/1.0/0.5) mirror Meta's published match-key priority and are not adjustable.
Meta Conversions API (CAPI) Event Quality Match (EMQ) Diagnostic
EMQ 10.0 Rating EngineEvaluate your customer parameter payload against Meta's Event Match Quality scoring algorithm. Test E.164 Australian phone normalization and verify real-time SHA-256 hashed JSON payloads.
Customer Information Parameters (PII)
+61412345678Browser & Device Context Signals
Match Keys Scoring Weight Breakdown
SHA-256 Hashed CAPI Payload Preview
{}In-Browser Web Crypto SHA-256 (Zero Plaintext Sent)
Deploy Normalized Meta CAPI Payload
Use the generated payload structure in your Node.js, Python, or sGTM CAPI tag to ensure all 8 customer parameters are properly hashed and formatted.
How Event Match Quality Affects Ad Delivery
Event Match Quality measures how effectively Meta matches server events with active user profiles. Hashed email and E.164 phone numbers deliver the largest improvements. Including browser cookie identifiers like fbp and fbc lifts match rates above 8.5 out of 10.
Implementation Code & Script
Production TypeScript helper to normalise phone numbers to E.164 format and compute SHA-256 hashes prior to dispatch.
export async function hashSha256(value: string): Promise<string> {
const clean = value.trim().toLowerCase();
if (!clean) return '';
const buffer = new TextEncoder().encode(clean);
const hashBuffer = await crypto.subtle.digest('SHA-256', buffer);
return Array.from(new Uint8Array(hashBuffer))
.map((b) => b.toString(16).padStart(2, '0'))
.join('');
}
export function normaliseAustralianPhone(phone: string): string {
const digits = phone.replace(/[^\d+]/g, '');
if (digits.startsWith('04') && digits.length === 10) {
return '+614' + digits.slice(2);
}
if (digits.startsWith('0') && digits.length === 10) {
return '+61' + digits.slice(1);
}
return digits.startsWith('+') ? digits : '+' + digits;
}EMQ Score & Deduplication Verification
Verify your event stream in Meta Events Manager > Test Events tab and check the Event Match Quality score card.
Pre-Production Verification Checklist
Ensure payload includes hashed email (em), phone (ph), client_ip_address, user_agent, and fbp cookie.
Check that Events Manager flags browser Pixel and server CAPI hits as "Deduplicated" via matching event_id.
Phone numbers must include country code (+61 for AU, +1 for US) with all spaces and hyphens stripped before SHA-256.
Terminal Diagnostic & Debug Commands
Dispatches test event directly to Meta Graph API and returns events_received count.
curl -X POST -H "Content-Type: application/json" "https://graph.facebook.com/v20.0/<PIXEL_ID>/events?access_token=<TOKEN>" -d @meta-capi-payload.jsonFailure Remediation & Troubleshooting
Cause: Only sending IP address and user agent without hashed email or _fbp browser cookie.
Fix: Capture email at checkout/form blur and pass _fbp cookie from browser context into server request.
Cause: PII string was hashed in uppercase or contained trailing whitespace prior to SHA-256 generation.
Fix: Run .trim().toLowerCase() on raw strings before passing to crypto digest function.
How to cite and attribute this tool
MIT LicenceThis resource is free, open and un-gated under the MIT Open Source Licence. You are encouraged to use, integrate and cite it with attribution:
@misc{geraghty_meta_capi_emq_diagnostic,
author = {Geraghty, Gordon},
title = {Meta Conversions API (CAPI) Event Match Quality Diagnostic & Normaliser},
year = {2026},
url = {https://gordongeraghty.com/resources/gtm-analytics/meta-capi-emq-diagnostic},
note = {Head of Performance Media, Empire Amplify}
}Changelog & Version History
v1.0.0Initial release with E.164 phone normalisation and client-side SHA-256 hashing inspection.
Strategic Takeaway & Operational Guidelines
An EMQ score of 8.0+ directly reduces reported CPA by improving Meta's ability to attribute conversions back to ad impressions. Passing normalized phone numbers alongside _fbp and _fbc ensures resilient matching even when iOS private browsing is enabled.