Skip to content

managed-components/facebook-pixel

Repository files navigation

Facebook Pixel Managed Component

Find out more about Managed Components here for inspiration and motivation details.

All Contributors

Released under the Apache license. PRs welcome! code style: prettier

πŸš€ Quickstart local dev environment

  1. Make sure you're running node version >=17.
  2. Install dependencies with npm i
  3. Run unit test watcher with npm run test:dev

βš™οΈ Tool Settings

Settings are used to configure the tool in a Component Manager config file

Pixel ID string required

property is a long number that identifies your Facebook Ads account. You can obtain it from the Events Manager underneath your site name.

Conversion API Access Token required

accessToken is a string used to authenticate when sending server side events in your name. You can obtain it following the information here.

Test Event Code

testKey is used to test your app or web browser events using test events tool Learn more

🧱 Fields Description

Fields are properties that can/must be sent with certain events

Facebook Event Name string required

ev can be "PageView", "Contact", "Add to Cart" one of the standard Facebook events, or a custom name.

Predicted Lifetime Value number

predicted_ltv is the predicted lifetime value of a subscriber as defined by the advertiser and expressed as an exact value.

Status boolean

status can be used with the CompleteRegistration event, to show the status of the registration.

Value number

value represents the value of a user performing this event to the business

Email string

em user email

Phone Number string

ph remove symbols, letters, and any leading zeros. Phone numbers must include a country code to be used for matching (e.g., the number 1 must precede a phone number in the United States). Always include the country code as part of your customers' phone numbers, even if all of your data is from the same country.

First Name string

fn using Roman alphabet a-z characters is recommended. Lowercase only with no punctuation.

Last Name string

ln using Roman alphabet a-z characters is recommended. Lowercase only with no punctuation.

Date of Birth string

db accepts the YYYYMMDD format accommodating a range of month, day and year combinations, with or without punctuation.

Gender string

ge can be an initial in lowercase.

City string

ct using Roman alphabet a-z characters is recommended. Lowercase only with no punctuation, no special characters, and no spaces.

State string

st use the 2-character ANSI abbreviation code in lowercase. Normalize states outside the U.S. in lowercase with no punctuation, no special characters, and no spaces.

Zip Code string

zp use lowercase with no spaces and no dash. Use only the first 5 digits for U.S. zip codes. Use the area, district, and sector format for the UK.

Country string

country use the lowercase, 2-letter country codes in ISO 3166-1 alpha-2. \n Important Note: Always include your customers' countries’ even if all of your country codes are from the same country. We match on a global scale, and this simple step helps us match as many people as possible from your list.

External ID string

external_id any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs

Subscription ID string

subscription_id the subscription ID for the user in this transaction; it is similar to the order ID for an individual product.

Facebook Login ID string

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

Lead ID string

lead_id is the ID associated with a lead generated by Facebook's Lead Ads

Data Processing Options string

data_processing_options holds the processing options you would like Facebook to enable for a specific event or record. If you do not provide a value for Data Processing Options, this field will not be included. Read more about the accepted values in Data Processing Options

Data Processing Options Country integer

data_processing_options_country holds the country that you want to associate with this data processing option. If you do not provide a value for Data Processing Options, this field will not be included. Read more about the accepted values in Data Processing Options

Data Processing Options State integer

data_processing_options_country holds the state that you want to associate to this data processing option. If you set a country, you must also set a state. Otherwise, Facebook will perform geolocation. If you do not provide a value for Data Processing Options, this field will not be included. Read more about the accepted values in Data Processing Options

πŸ“ License

Licensed under the Apache License.

πŸ’œ Thanks

Thanks to everyone contributing in any manner for this repo and to everyone working on Open Source in general.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Simona Badoiu

πŸ’»

Yo'av Moshe

πŸ’»

Ruskin

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!