Advanced matching is like writing a name and phone number on a parcel slip instead of just the address. A recipient who cannot be found by address can be found with contact details. The better an event is matched to a person, the more reliably ads are credited to them.
The manual route is to add visitor data as a JSON object in the third argument of the fbq('init') call in the base code. If you pass {em, fn, ln}, the pixel hashes the values with SHA-256 automatically. Email accepts either lowercase plain text or a normalized SHA-256 hash. The docs set formats: em, fn and ln in lowercase; ph as digits only including country and area code; db as eight digits such as 19910526; ct lowercase with spaces removed; st and country as lowercase two-letter codes. external_id, an advertiser-supplied ID, can also be sent. It must sit in the base code to count as manual advanced matching.
You can also enable automatic advanced matching in Events Manager. How well events match is shown as Event Match Quality (EMQ) in Events Manager; the docs recommend aiming for Good or Great and waiting 1 to 2 days after changes for it to update. With Signals Gateway there is a separate toggle to enhance events with advanced matching data.
Note that sending values brings data-handling responsibility with it. By default the pixel collects only form field names; values are sent only through advanced matching or optional values.
When to use
Use it when event match quality looks low or when you can use emails captured at login or checkout.