Meta Pixel Event Tester

Build Meta Pixel event code, validate fbq() calls, and generate Google Tag Manager tags. Covers all 18 standard events with parameters.

Event Code Builder

Your Pixel ID is used only to generate code in your browser. Nothing is sent to any server.

Generated code

Full Meta Pixel base code + event

Fill in the builder on the left and click Generate code.

Code Validator
Event Reference Table
Event When to fire Required Optional Example use case
How to install the Meta Pixel on your website

Manual installation: copy the full base pixel code from Meta Events Manager or use this tool's Full code tab, then paste it between the <head> and </head> tags of every page on your site. Place it as high as possible in the head so it loads before other scripts.

Google Tag Manager: paste the pixel code into a new Custom HTML tag. Set the trigger to All Pages for the base code. Create separate Custom HTML tags for each event, triggered by your site's data layer pushes or click triggers. Use the GTM tab in this tool to get the correctly wrapped code.

Shopify: go to Online Store then Preferences and paste your Pixel ID into the Facebook Pixel field. Alternatively, install the Facebook and Instagram sales channel app, which handles base code installation and standard e-commerce events automatically.

Standard events vs custom events

Standard events are 18 predefined event names that Meta recognizes. Use them whenever your action maps to one: ViewContent for product page views, AddToCart for cart additions, Purchase for completed orders. Standard events can be used as optimization signals for ad delivery. Meta can optimize your campaign to find users most likely to complete a Purchase.

Custom events are any event name you define, tracked with fbq('trackCustom', 'EventName'). Use them only when no standard event fits the action. Custom events can be used for audience building and reporting but cannot be used for all optimization objectives. Always prefer a standard event when one fits.

Meta Conversions API vs browser pixel

The browser pixel fires from the visitor's browser using JavaScript. It is blocked by ad blockers, affected by cookie restrictions, and can fail in low-connectivity environments. Despite these limitations, it is easy to implement and provides immediate real-time data in Events Manager.

The Conversions API sends events directly from your server to Meta, bypassing the browser entirely. It is not affected by ad blockers or browser restrictions, which improves your event match quality and data completeness.

Meta recommends using both together. The browser pixel handles the real-time feedback loop while the Conversions API fills the gaps. When both fire for the same event, Meta deduplicates using the event ID so data is not counted twice.

Common Meta Pixel mistakes
  • Installing duplicate pixels on the same page: fires events twice and inflates conversion metrics.
  • Missing currency parameter on Purchase events: Meta cannot calculate ROAS without it.
  • Firing AddToCart on page load instead of on the actual add-to-cart button click: inflates cart data and misleads optimization.
  • Not using content_ids for dynamic product ads: DPA cannot retarget without matching product IDs to your catalog.
  • Forgetting the noscript fallback image tag for users with JavaScript disabled: some visitors never execute JavaScript.
Frequently Asked Questions
What is the Meta Pixel and how does it work?

The Meta Pixel is a small piece of JavaScript code that you place on your website. When a visitor takes an action (views a page, adds to cart, makes a purchase), the pixel fires an event back to Meta so you can track conversions, build audiences, and optimize ad delivery.

How many standard events does Meta Pixel support?

Meta supports 18 standard events: PageView, ViewContent, Search, AddToCart, AddToWishlist, InitiateCheckout, AddPaymentInfo, Purchase, Lead, CompleteRegistration, Contact, FindLocation, Schedule, StartTrial, SubmitApplication, Subscribe, CustomizeProduct, and Donate.

Do I need both the Meta Pixel and the Conversions API?

Meta recommends using both. The browser pixel captures client-side events while the Conversions API sends server-side events. Together they improve event match quality, reduce data loss from ad blockers, and give Meta more signal for optimization.

How do I test if my Meta Pixel is firing correctly?

Use the Meta Pixel Helper Chrome extension to see which events fire on any page. You can also check Events Manager in your Meta Business Suite to see incoming events in real time. This tool helps you build the correct code before deploying it.

What is the difference between fbq('track') and fbq('trackCustom')?

fbq('track', 'EventName') is for the 18 standard events that Meta recognizes for optimization and reporting. fbq('trackCustom', 'MyCustomEvent') is for any custom event you define. Standard events can be used for ad optimization (like optimizing for Purchase). Custom events can be used for audience building and reporting but not all optimization objectives.

Related tools