Server-Side API: User Data Parameters

user_data is a set of identifiers Facebook can use for targeted attribution. You must provide at least one of the following user_data keys in your request: (Click on each key to see a full description)


  • If you send client_ip_address or client_user_agent, you must send both keys.
  • All of these values for these keys are of type String.

Normalize and Hash

See Custom Audiences from CRM Data for details on how to normalize and hash the data you send. For example, you should trim string data and send it in lower-case. You should also send all data hashed with SHA256 and UTF-8 encoding. We do not accept unhashed data, unless noted below.

Pixel Comparison

You can send most of these user data parameters through the Facebook Pixel as well. For instance, to send external_id through the Pixel, use the following code:

fbq('init', 'PIXEL_ID', {'external_id': 12345});

Read about the other parameters you can pass in the Advanced Matching documentation.


Key Type: Email | Hashing Needed

An email address, in lowercase. Example:


Key Type: Phone | Hashing Needed

A phone number. Include only digits with country code, area code, and number. Example: 16505551212


Key Type: Gender | Hashing Needed

Gender, in lowercase. Either f or m.


Key Type: Date of Birth | Hashing Needed

A date of birth given as year, month, and day. Example: 19971226 for December 26, 1997.


Key Type: Last Name | Hashing Needed

A last name in lowercase. Example: smith.


Key Type: First Name | Hashing Needed

A first name in lowercase. Example: joe.


Key Type: City | Hashing Needed

A city in lower-case without spaces or punctuation. Example: menlopark.


Key Type: State | Hashing Needed

A two-letter state code in lowercase. Example: ca.


Key Type: Zip | Hashing Needed

If you are in the United States, this is a five-digit zip code. For other locations, follow each country's standards. Example: 94035 (for United States)


Key Type: Country | Hashing Needed

A two-letter country code in lowercase. Example: us.


Key Type: External ID | Hashing is recommended

Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. If External ID is being sent via other channels, it should be sent in the same format via Server-Side API.


Key Type: Client IP address | Do not hash

The IP address of the browser corresponding to the event.


Key Type: Client user agent | Do not hash

The user agent for the browser corresponding to the event.


Key Type: Click ID | Do not hash

The Facebook click ID value stored in the _fbc browser cookie under your domain. See Managing fbc and fbp Parameters for how to get this value, or generate this value from a fbclid query parameter.


Key Type: Browser ID | Do not hash

The Facebook browser ID value stored in the _fbp browser cookie under your domain. See Managing fbc and fbp Parameters for how to get this value.


Key Type: Subscription ID | Do not hash

The subscription ID for the user in this transaction. This is similar to the order ID for an individual product. Example: anid1234.