User Data Parameters

Please visit the Facebook Privacy and Data Use Guide to learn what data is sent when using Facebook pixel.

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)

Notes:

  • If you send client_ip_address or client_user_agent, you must send both keys.

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.


client_ip_address

Object Type: string | Key Type: Client IP address | Do not hash

The IP address of the browser corresponding to the event.

Note: This information is automatically added to events sent through the browser, but must be manually configured to events sent through server.

client_user_agent

Object Type: string | Key Type: Client user agent | Do not hash

The user agent for the browser corresponding to the event.

Note: This information is automatically added to events sent through the browser, but must be manually configured to events sent through server.

country

Object Type: string | Key Type: Country | Hashing Needed

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

ct

Object Type: string | Key Type: City | Hashing Needed

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

db

Object Type: string | Key Type: Date of Birth | Hashing Needed

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

em

Object Type: string | Key Type: Email | Hashing Needed

An email address, in lowercase. Example: joe@eg.com

external_id

Object Type: string | 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.

fb_login_id

Object Type: integer | Key Type: FB Login ID | Do not hash

ID issued by Facebook when a person first logs into an instance of an app. This is also known as App-Scoped ID.

fbc

Object Type: string | 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.

fbp

Object Type: string | 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.

fn

Object Type: string | Key Type: First Name | Hashing Needed

A first name in lowercase. Example: joe.

ge

Object Type: string | Key Type: Gender | Hashing Needed

Gender, in lowercase. Either f or m.

lead_id

Object Type: integer | Key Type: Lead ID | Do not hash

ID associated with a lead generated by Facebook's Lead Ads.

ln

Object Type: string | Key Type: Last Name | Hashing Needed

A last name in lowercase. Example: smith.

ph

Object Type: string | Key Type: Phone | Hashing Needed

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

st

Object Type: string | Key Type: State | Hashing Needed

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

subscription_id

Object Type: string | 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.

zp

Object Type: string | 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)

See Also