Skip to content

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.

By Gordon Geraghty·MIT Licence·Updated: 24 September 2026·INTERMEDIATE
01 Prerequisites & Architecture
Stage 01 Architecture

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).

Difficulty:Intermediate Engineering
Time:20–25 mins
Required Access & Permissions:
Meta Business Manager AdminEvents Manager AccessPixel / Dataset Admin
STEP 01Checkout / Lead Form
Customer PII EntryEmail, phone, name, postcode inputs
STEP 02Client/Server Normalizer
Normalization EngineLowercase, trim, E.164 phone formatting
STEP 03Web Crypto / Crypto Module
SHA-256 HashingCryptographic hex digest generation
STEP 04Meta Graph API / CAPI
Meta Graph API v20.0Event Match Quality evaluation & matching
02 Interactive Configurator

Meta Conversions API (CAPI) Event Match Quality Diagnostic & Normaliser Configurator

Worked Example · Deterministic Calculation

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

ParameterValueContext & Provenance
Customer Emailuser@example.com Weight: 3.5 ptsPrimary CRM match identifier
Mobile Phone0412 345 678 Weight: 2.5 ptsNormalized to E.164 (+61412345678) before SHA-256 hashing
Meta Browser Cookie (_fbp)fb.1.1718000000000.123456789 Weight: 1.5 ptsFirst-party browser cookie identifier
Meta Click ID (_fbc)fb.1.1718000000000.IwAR2... Weight: 1.0 ptsAd click attribution correlation key
Client IP & User Agent203.0.113.195 Weight: 1.0 ptsServer-side device fingerprinting parameters
External Customer IDCRM_98412 Weight: 0.5 ptsDeterministic 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

Event Match Quality (EMQ)10.0 / 10.0EMQ ScoreMaximum possible match fidelity score across all 6 parameter categories
EMQ Match RatingEXCELLENTQuality TierScore >= 8.0 qualifies for optimal Meta delivery algorithm conversion attribution
Computed MetricResultInterpretation & Threshold
Event Match Quality (EMQ)10.0 / 10.0 EMQ ScoreMaximum possible match fidelity score across all 6 parameter categories
EMQ Match RatingEXCELLENT Quality TierScore >= 8.0 qualifies for optimal Meta delivery algorithm conversion attribution
Payload CryptographySHA-256 Verified HashingAll PII fields strictly lowercased, trimmed, and hashed into 64-character hex digests

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.

INSTRUMENT BOUNDARIES

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 Engine

Evaluate 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)

Normalized: +61412345678

Browser & Device Context Signals

Event Match Quality (EMQ)
10 / 10.0
Rating: EXCELLENT
Meta CAPI v20.0 Status
Optimal Attributed
Client + Server Deduplication
Match Keys Scoring Weight Breakdown
Email Address (em)(High-fidelity SHA-256 match key)
3.5 / 3.5 pts
Phone Number (ph)(E.164 international format match)
2.5 / 2.5 pts
Meta Browser ID (_fbp)(First-party browser cookie link)
1.5 / 1.5 pts
Meta Click ID (_fbc / fbclid)(Ad click correlation key)
1.0 / 1.0 pts
Client IP & User Agent(Enables server-side device matching)
1.0 / 1.0 pts
External User ID (external_id)(Deterministic loyalty/account ID)
0.5 / 0.5 pts
SHA-256 Hashed CAPI Payload Preview
{}

In-Browser Web Crypto SHA-256 (Zero Plaintext Sent)

Export & Deployment Actions1-click clipboard transfer, shareable URL hash, and local file downloads.

Built by Gordon Geraghty, Head of Performance MediaClient-Side SHA-256 Engine
03 Deployment & Export

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

Client-Side First-Party Parameter Normalisermeta-capi-normaliser.tstypescript

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;
}
04 QA & Verification Guide

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

✓
Achieve EMQ Score >= 8.5 / 10.0

Ensure payload includes hashed email (em), phone (ph), client_ip_address, user_agent, and fbp cookie.

✓
Verify Deduplication in Test Events

Check that Events Manager flags browser Pixel and server CAPI hits as "Deduplicated" via matching event_id.

✓
Confirm E.164 Phone Number Standard

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

Test CAPI Endpoint via cURLbash

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.json

Failure Remediation & Troubleshooting

Issue: EMQ Score Dropping Below 5.0 (Poor)

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.

Issue: Hash Format Validation Error from Meta API

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 Licence

This resource is free, open and un-gated under the MIT Open Source Licence. You are encouraged to use, integrate and cite it with attribution:

Geraghty, G. (2026). Meta Conversions API (CAPI) Event Match Quality Diagnostic & Normaliser. Gordon Geraghty Resources Hub. https://gordongeraghty.com/resources/gtm-analytics/meta-capi-emq-diagnostic
BibTeX Format
@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.