Facebook (Meta) Pixel
17 min
facebook pixel serves as tracking code for websites to monitor visitor behaviors including page views, purchases, and sign ups this tool helps advertisers assess facebook ad effectiveness, refine campaigns through user behavior analysis, and create targeted advertising across meta platforms getting started this is a device mode destination one or more facebook pixel ids are required for connection you can obtain a pixel id from the snippet generated on the facebook pixel creation page multiple pixel ids the destination supports any number of pixel ids on a single destination initialization is lazy — on the first tracked event the facebook events script is loaded once (shared across all pixel ids), and each pixel id is initialized on demand before its events are sent all events are dispatched per pixel using meta's tracksingle api rather than the broadcast track api, so each pixel receives exactly the events configured for it with no cross pixel spillover common use cases multi agency setups — route the same storefront events to pixels owned by different media agencies without creating separate cdp destinations brand or market segmentation — fire events to separate pixels for distinct brands or regional ad accounts that share a single storefront parallel testing — run a new pixel alongside an existing one during a transition period to validate parity before cutting over adding a second pixel id open the edit form for the destination click add in the pixel ids section to add a new row enter the additional pixel id click save changes after saving, the new pixel will be initialized on the next tracked event and will start receiving all mapped events alongside the existing pixels removing a pixel id delete the row from the pixel ids list and save the pixel stops receiving events as soon as the updated configuration is picked up — no further events will be sent to it no data is deleted from meta — historical events already received by that pixel are unaffected migrating from a legacy single pixel id destinations created before multi pixel support was added store their id in a legacy pixelid field the edit form automatically promotes this value into the new pixel ids list on first open, so no manual migration is needed save the form once to persist the promoted value; after that the destination is fully on the new format connecting to the facebook pixel cdp destination warning before connecting destinations in the chord cdp, please verify with all destination owners that all non chord cdp configured destinations are disabled running external destinations alongside configured chord cdp destinations can result in duplicate events downstream log into the chord data platform navigate to the cdp click the "add" button next to destinations select facebook pixel from the destination catalog enter the destination name and one or more facebook pixel ids click add to add a row for each pixel id each id must be entered on its own row — blank rows are ignored to send events to a single pixel, add just one id optionally configure product content id field — which product field to use as the content id ( sku , product id , or variant id ) defaults to sku this value will be used in the contents \[] id field click "create" to connect events event mapping chord event facebook event page pageview checkout started initiatecheckout order completed purchase product added addtocart product viewed viewcontent subscription created subscribe common event options option chord source (priority order) notes eventid messageid used for event deduplication external id userid > anonymousid omitted if neither is present event details page fires a facebook page view event facebook sdk call fbq("tracksingle", pixelid, "pageview", {}, eventoptions) the call is repeated for each configured pixel id no additional attributes accompany page events checkout started fires an initiate checkout event with order and product data facebook sdk call fbq("tracksingle", pixelid, "initiatecheckout", orderdata, eventoptions) (repeated for each configured pixel id) facebook attribute chord source (priority order) notes content ids product sku > product id (or configured productcontentidfield ) array of all product ids content type (hardcoded) "product" content category first product's category contents array of { id, quantity, item price } per product id uses sku > product id ; quantity defaults to 1 currency properties currency > properties meta i18n currency > "usd" (default) value properties total formatted to 2 decimal places; defaults to "0 00" num items count of content ids order id properties order id / properties orderid for deduplication; omitted if not present returns empty object if order products is empty order completed fires a purchase conversion event with order and product data facebook sdk call fbq("tracksingle", pixelid, "purchase", orderdata, eventoptions) (repeated for each configured pixel id) same attributes as checkout started above product added fires an add to cart event using the first product from order products facebook sdk call fbq("tracksingle", pixelid, "addtocart", productdata, eventoptions) (repeated for each configured pixel id) facebook attribute chord source (priority order) notes content ids product sku > product id (or configured productcontentidfield ) single value (not array) content type (hardcoded) "product" content name product name content category product category currency properties currency > properties meta i18n currency > "usd" (default) value product price formatted to 2 decimal places; defaults to "0 00" contents \[{ id, quantity, item price }] single element array; quantity defaults to 1 returns empty object if order products is empty product viewed fires a content view event using the first product from order products facebook sdk call fbq("tracksingle", pixelid, "viewcontent", productdata, eventoptions) (repeated for each configured pixel id) same attributes as product added above subscription created fires a subscribe event with order and product data facebook sdk call fbq("tracksingle", pixelid, "subscribe", orderdata, eventoptions) (repeated for each configured pixel id) same attributes as checkout started above all other track events and identify events are silently skipped initialization the plugin supports one or more pixel ids per destination on the first event, it loads the facebook events script once (shared across all pixel ids on the page), then calls fbq("init", pixelid) for each configured id — optionally with { external id } if userid or anonymousid is present on the triggering event each pixel id has its own initialization lifecycle ( fresh > loading > loaded / failed ), so ids initialize independently without blocking one another the script load itself is shared via a single promise — concurrent events during loading queue until the script is ready if the script fails to load, all subsequent events are silently dropped if no valid pixel ids are configured, the plugin logs a warning and skips initialization entirely csp requirements if your site uses a content security policy, allow the following domains directive domain script src https //connect facebook net connect src https //connect facebook net updated 12 may 2026 — added multiple pixel id support and migration guidance