Magento 2 Facebook Pixel & Conversions API Extension
Add the Meta Pixel to your Magento 2 store and send the same events from your server through the Conversions API, so Facebook and Instagram ads optimize on complete data.
The extension tracks 8 standard Meta events, from product views to purchase, merges browser and server copies by one event ID, and lets you check every event before you rely on it.
- Send 8 standard Meta events from every store page.
- Send the same events from your server through the Conversions API.
- Keep tracking purchases when an ad blocker stops the pixel.
- Preview and validate the events your store sends to Meta.
The Meta Pixel runs in the shopper's browser, so ad blockers and browser restrictions stop part of your events. Meta then optimizes your Facebook and Instagram ads on incomplete data and shows fewer sales than you made.
The extension adds the pixel to every page without theme edits and sends 8 standard Meta events twice: from the browser and from your server through the Conversions API. Both copies carry one event ID, so Meta counts each event once.
Main features of the Magento 2 Facebook Pixel extension
- Meta Pixel on every store page, no theme code to edit
- 8 standard Meta events, from product views to purchase
- Conversions API: the same events sent from your server
- Browser and server events deduplicated by one event ID
- Advanced matching with hashed customer data
- Commands that preview and validate the events before you rely on them
- One data layer shared with our GA4, TikTok and Mixpanel extensions
- Works with Luma and Hyvä, Content Security Policy and multiple store views
Conversions API: events that reach Meta when the pixel can't
The pixel alone depends on the browser. When an ad blocker or a browser setting stops it, the purchase still happens, but Meta never hears about it, and your campaigns look worse than they are.
Every event goes from the browser and from your server
Once you add a Conversions API access token, the extension sends each event the pixel tracks from your server as well. If an ad blocker stops the pixel, the server copy still reaches Meta.
One event ID, so nothing is counted twice
The browser event and its server copy share the same event ID. Meta uses it to merge the pair, so a purchase seen by both the pixel and the Conversions API appears in Events Manager once.
Advanced matching helps Meta recognize the buyer
Server events carry the customer data Meta uses to match a visit to a Facebook or Instagram account: email, phone, name, city, region, ZIP code and country, plus the browser's Meta cookies, IP address and user agent. The data is normalized and hashed before it leaves your store.
Server events don't slow down your pages
The call to Meta is made after the page has already been sent to the shopper, so visitors never wait for it.
Which events the extension sends to Meta
These are Meta's standard events, under the same names you'll see in Events Manager. ViewContent fires on both product and category pages. Product, cart, checkout and purchase events carry the product IDs, prices, quantities, order value and currency.
- View content
ViewContent - Search
Search - Add to cart
AddToCart - Add to wishlist
AddToWishlist - Start checkout
InitiateCheckout - Add payment info
AddPaymentInfo - Purchase
Purchase - Customer registration
CompleteRegistration
AddToCart is also sent when products are added to the cart over AJAX, including AJAX carts added by third-party extensions.
Data ready for catalog ads
Product events send the product ID together with its type, so Meta can match them to the items in your Meta catalog for Advantage+ catalog ads and retargeting. You choose whether the ID is the SKU or the product ID, to match how your catalog is built.
To create and update that catalog from Magento, use our Facebook product feed.
Check what your store sends to Meta
Before you trust the numbers in Ads Manager, preview the exact events your store builds for a product, a category or a search, and run a validation that reports missing prices or currency, empty product IDs, a missing event ID or a pixel code that points to a different pixel than your settings. Both run from the command line, without a browser.
In debug mode, the extension also logs Meta's response to every server event.
One data layer for all your ad pixels
The extension runs on the same tracking layer as our GA4 and Google Tag Manager extension, TikTok Pixel and Mixpanel. If you add any of them, Meta, Google and TikTok receive the same events, products and order totals, and you set up attribute mapping, prices in the store currency, event exclusions and debugging in one place.
How to add the Facebook Pixel to Magento 2
1. Connect the pixel. Paste your Pixel ID and the pixel code from Meta Events Manager into the extension settings. The extension adds the code to every page of your store, except AMP pages.
2. Turn on the Conversions API. Generate an access token in Events Manager and paste it in, so the server events start.
3. Check the events. Open Meta's Test Events tool or run the validation command.
You can also add the domain verification tag, use a different pixel for each store view, and keep the pixel working on stores with Content Security Policy enabled. See the quick start guide for details.
- intuitive setup process
- robust features
- amazing support
Save time by starting your support request online and we'll connect you to an expert.
Does it send events through the Conversions API as well as the pixel?
Yes. Once you add a Conversions API access token, every event the pixel tracks is also sent from your server. The browser event and the server event share one event ID, so Meta merges them and counts each event once.
Does tracking work when visitors use an ad blocker?
An ad blocker stops the pixel in the browser, but it can't stop your server. With the Conversions API access token in place, the server copy of each event still reaches Meta, so purchases from those visitors aren't lost.
Which events does the extension send to Meta?
Eight standard Meta events: ViewContent (product and category pages), Search, AddToCart, AddToWishlist, InitiateCheckout, AddPaymentInfo, Purchase and CompleteRegistration. Purchase is sent from the order success page, including Klarna checkout and purchase orders.
The extension doesn't send custom events.
How do I add the Facebook Pixel to Magento 2?
Paste your Pixel ID and pixel code from Meta Events Manager into the extension settings, then generate a Conversions API access token in Events Manager and paste it in as well. The extension adds the code to every page, so you don't edit theme files.
Check the events in Meta's Test Events tool. See the quick start guide for the details.
How do I check that my events reach Meta correctly?
Use Meta's Test Events tool in Events Manager, or run the extension's preview and validation commands. They show the exact event your store builds for a product, a category or a search, and report missing prices or currency, empty product IDs, a missing event ID or a pixel code that points to a different pixel than your settings.
In debug mode, the extension also logs Meta's response to each server event.
Does it sync my products to a Meta catalog or Facebook Shop?
No, the extension tracks events. It sends product IDs in the format Meta needs to match them to your catalog, and you choose whether the ID is the SKU or the product ID.
To create the catalog itself from Magento, use our Facebook product feed.
Can I use it together with your Google Tag Manager and TikTok Pixel extensions?
Yes. They run on the same tracking layer, so Meta, Google and TikTok receive the same events, products and order totals. Attribute mapping, prices in the store currency, event exclusions and debug mode are set up once for all of them.
Does it track AJAX add-to-cart?
Yes. AddToCart is sent when products are added to the cart over AJAX, including AJAX carts added by third-party extensions.
Does it work with Hyvä and Content Security Policy?
Yes. Hyvä is supported out of the box, without a separate compatibility package, and the pixel keeps loading on stores with Content Security Policy enabled.
mirasvit/module-tm) 1.4.0 or later; with an older version, tax-exclusive amounts are sent as before.mirasvit/module-fb-marketing-hyva was still installed, composer update refused to resolve and named no way out until you removed it by hand. Composer now removes it by itself during the upgrade. Hyvä support keeps working as before: it comes with this module and Marketing Tracking (mirasvit/module-tm).Blog
We are committed to being open and transparent with our customers. When you purchase our module, you automatically receive one year of free support service and free updates.
Why is this important?
- Seamless Installation and Configuration: We understand that setting up a new module can take time to configure according to your specific needs. That’s why we offer a full year of free support. Our experienced team is here to assist you with installation, configuration, and any questions you might have. We're eager to share our expertise to ensure you get the most out of your purchase.
- Stay Updated with Magento (Adobe Commerce) Releases: Magento releases new versions approximately every three months. These updates can sometimes introduce compatibility challenges. To keep your store running smoothly, we provide a year of free access to the latest versions of our modules, ensuring that you can upgrade Magento and our modules without encountering any obstacles.
- Subscription Included: Renewing your subscription ensures continued access to the latest updates and support from our team. This means you can be confident that any issues you encounter with the extension will be resolved quickly and efficiently. You can cancel your subscription at any time without any additional fees.
These are our primary. A major portion of our new clients come from referrals from our existing clients. Our professional team of developers, marketers and support staff have invested the best knowledge and experience in the field into our work, so you know you can come back to us again and again.
One year free and high quality support. We go to great lengths to provide maximum satisfaction with every module you have purchased in our store. By helping you with installation, configuration, answering your every question, we do all our best to eliminate any possible problems.
30-days money back guarantee. If you are not satisfied with our Facebook Pixel for Magento 2 performance for any reason, we provide a full refund.
We constantly add new features to all our modules, and are always interested in hearing your opinion and implementing your suggested features in our future developments.
We provide an expanded user guide for every aspect of our Magento Facebook Conversions API, so you can find answers for all your burning questions.
You can customize Facebook Pixel Magento 2 extension according to your needs and requirements.
The Module is easy to install and upgrade, just follow our step-by-step user guide. Additionally, the extension is ready to use with the Hyvä theme.
No core modifications. The Facebook Pixel Magento 2 extension has been tested in a Magento Cloud environment and is fully compatible with it.
Andriy Kovalenko
Anton Gurtovoi