What code sends this Meta Pixel event?
Pick one of Meta's standard events and fill in the properties Meta lists for it. You get the fbq('track') code to copy, with an event ID for deduplication with the Conversions API if you want one.
Send the same ID as event_id from your server through the Conversions API, with the same event name. Meta discards the later of the two when both reach the same pixel within 48 hours.
Fill it in only to send this event to one pixel when the page loads more than one. The code then uses fbq('trackSingle'), as Meta's deduplication guide shows.
What it writes
- Meta's 17 standard events. Each with the properties Meta's Pixel reference lists for it, plus content_name and content_category, which the reference lists as properties without tying them to one event.
- Values of the right type. value and predicted_ltv as numbers, num_items and quantities as whole numbers, content_ids as a list, contents as a list of objects with id and quantity, status as true or false, and currency as a three-letter ISO 4217 code.
- Required properties. Meta's reference makes currency and value required for Purchase, so the page flags them when they are empty. It also says when Advantage+ catalog ads need content_ids or contents.
- Deduplication. An eventID in the fourth argument of fbq, as Meta documents for events you also send through the Conversions API. Write it as fixed text or as a variable your page already has, such as the order number.
- Values that cannot break the code. Text goes in quotes with every special character escaped, and a variable name is accepted only as letters, digits, _ and $ with points between the parts.
The events and properties come from Meta's Pixel reference, deduplication from Deduplicate Pixel and server events, and the currency format from the Conversions API's custom data parameters, all read in November 2026.
What it does not do
It does not install the Meta Pixel. The pixel's base code has to be on the page already, and the event code only sends an event through it. To see which tags a page loads, use the tracking tag checker.
It does not send the server event. Deduplication works only if your server sends the same event name with the same ID as event_id through the Conversions API.
It writes fixed values. Put your page's own variables in place of prices, IDs and order numbers. Custom events and custom properties are not in the form. Everything runs in your browser and nothing you type is sent anywhere.
Questions
What is content_type for?
It says whether content_ids and contents hold product IDs (product) or product group IDs (product_group). Meta's reference says that without it, Meta matches the event to any item with the same ID.
What should the event ID be?
A value that is different for every event and that your server also knows, such as the order number of a purchase. Meta's guide asks for a unique value and matches it with the event_id of the server event.
content_ids or contents?
content_ids is a plain list of IDs. contents adds the quantity of each product. You can send both; for Advantage+ catalog ads, Meta's reference names which of the two each event needs.
Is anything sent to Meta?
No. The page only writes code for you to copy. The pixel ID is checked in your browser, the same way the tracking tag checker reads it.