Facebook Pixel Managed Component
Find out more about Managed Components here for inspiration and motivation details.
🚀 Quickstart local dev environment
- Make sure you're running node version >=17.
- Install dependencies with
npm i
- Run unit test watcher with
npm run test:dev
⚙️ Tool Settings
Settings are used to configure the tool in a Component Manager config file
string
required
Pixel ID 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
string
required
Facebook Event Name ev
can be "PageView", "Contact", "Add to Cart" one of the standard Facebook events, or a custom name.
number
Predicted Lifetime Value predicted_ltv
is the predicted lifetime value of a subscriber as defined by the advertiser and expressed as an exact value.
boolean
Status status
can be used with the CompleteRegistration event, to show the status of the registration.
number
Value value
represents the value of a user performing this event to the business
string
Email em
user email
string
Phone Number 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.
string
First Name fn
using Roman alphabet a-z characters is recommended. Lowercase only with no punctuation.
string
Last Name ln
using Roman alphabet a-z characters is recommended. Lowercase only with no punctuation.
string
Date of Birth db
accepts the YYYYMMDD format accommodating a range of month, day and year combinations, with or without punctuation.
string
Gender ge
can be an initial in lowercase.
string
City ct
using Roman alphabet a-z characters is recommended. Lowercase only with no punctuation, no special characters, and no spaces.
string
State 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.
string
Zip Code 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.
string
Country 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.
string
External ID external_id
any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs
string
Subscription ID subscription_id
the subscription ID for the user in this transaction; it is similar to the order ID for an individual product.
string
Facebook Login ID 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
string
Lead ID lead_id
is the ID associated with a lead generated by Facebook's Lead Ads
string
Data Processing Options 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
integer
Data Processing Options Country 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
integer
Data Processing Options State 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!