Chord CDP
...
CDP Destination Catalog
Facebook Pixel
15 min
facebook pixel introduction 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 requiring a facebook pixel id for connection you can obtain the pixel id from the snippet generated on the facebook pixel creation page connecting to the facebook pixel cdp destination 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 facebook pixel 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("track", "pageview", {}, eventoptions) 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) facebook attribute chord source (priority order) notes content ids product sku > product id > 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 > id ; quantity defaults to 1 currency properties currency > properties meta i18n currency > "usd" (default) value properties total > properties value formatted to 2 decimal places; defaults to "0 00" num items count of content ids order id properties order id / properties orderid / properties id 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) 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) facebook attribute chord source (priority order) notes content ids product sku > product id > 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) 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) same attributes as checkout started above all other track events and identify events are silently skipped initialization the plugin initializes the fbq function queue with disablepushstate true (preventing automatic pageview tracking) and allowduplicatepageviews true , then loads the facebook events script after loading, it calls fbq("init", pixelid) optionally with { external id } if userid or anonymousid is available on the triggering event the plugin manages sdk loading state ( fresh > loading > loaded / failed ) to prevent duplicate script loads concurrent events during loading queue via a shared initialization promise if the script fails to load, subsequent events are silently dropped 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