Meta Pixel Event Code Generator — fbq Track Events

Build Meta Pixel event code — fbq('track', 'Purchase', …) — for Lead, Purchase, AddToCart, CompleteRegistration and every other standard event, with value, currency and contents, an event ID for deduplication, and an optional click or form-submit trigger.

Runs in your browserUpdated

Items

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the Meta Pixel Event Generator

  1. Pick the standard event, or Custom event.
  2. Fill in value, currency and items.
  3. Add the order ID as event ID if you also use the Conversions API.
  4. Copy the code; check it in Events Manager → Test events.

Standard or custom?

Meta optimizes ad delivery for standard events, so use them whenever one fits — a contact form is Lead, a booking Schedule, an order Purchase. Custom events (trackCustom) work for reporting and custom conversions. Send the same event from your server with the Conversions API generator.

Also searched as: meta pixel event code, facebook pixel event code, fbq track, facebook pixel purchase event, meta pixel lead event, fbq trackcustom, meta pixel standard events.

Tools that pair well with the Meta Pixel Event Generator

  • Ad Pixel Event Code Generator — Pick a platform — Meta Pixel, Meta Conversions API, TikTok Pixel, LinkedIn Insight Tag or Pinterest Tag — choose a standard event like Lead, Purchase or CompletePayment, fill in the value, currency and items, and copy code that fires right away or on a click or form submit.
  • TikTok Pixel Event Generator — Create TikTok Pixel event code — ttq.track('CompletePayment', …) — for SubmitForm, CompleteRegistration, AddToCart, PlaceAnOrder, CompletePayment and more, with contents, value, currency and an event ID to match the Events API.
  • Consent Mode Checker — Check a site’s cookie consent the way a regulator or an ad platform would.
  • GA4 Event Code Generator — Pick a recommended GA4 event — generate_lead, sign_up, purchase, add_to_cart and more — or name your own, fill in the parameters and items, and copy the code as gtag(), a Tag Manager dataLayer.push() or a server-side Measurement Protocol request.

Frequently asked questions

Which event should a contact form use?
Lead — or Contact if it starts a conversation rather than a sales lead.
Why is my Purchase value missing in Ads Manager?
Value must be a number and currency a three-letter code like USD, sent with the Purchase event.
How do I test pixel events?
Open Events Manager → your pixel → Test events, enter your site URL, and trigger the event; it appears within seconds.
Can I install Meta Pixel Event Generator as a web app and use it offline?
Yes. Meta Pixel Event Generator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools