Magento 2 Facebook Pixel & Conversions API Extension

View Demo

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.
Marketplace Approved
Hyvä
Magento Cloud
WCAG
Mage-OS
Compatible with:
Community:
2.3.* - 2.4.9
Enterprise:
2.3.* - 2.4.9
Problem

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.

Solution

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.

Conversions API prerequisites: Meta Business Manager and a Meta Pixel
No hidden fees
Our developers install the extension on your store and configure it for your setup, free of charge.
Lifetime access to source code
Access to free support and updates for 1 year
Updates and support prolongation - $54

Pay today $89 for the first year.

Then $54 for updates and support services per year.

Cancel anytime.

30 days money back guarantee
See it in action!
Pick a quick tutorial to learn about various aspects of this extension
Customer Reviews 3
Earn points for your review about this extension modules. $1 = 10 points
Write Your Own Review

check-circle You submitted your review for moderation.

Faisal Verified Buyer
From Bahrain
Using the module for almost 1 year
Easy Installation
Very easy to install and use. Game changer
Also installed:
IP Geolocation Redirect,  Automatic Related Products,  Google Tag Manager,  Advanced Product Feeds,  Advanced SEO Suite,  AI Assistant,  eChat and 8 more
Eva Verified Buyer
From Vilnius, Republic of Lithuania
Using the module for over 1 month
Easy setup
Easy to setup. But still we found that something is blocking from getting events recorded by event manager. But it is problem on our Magento store, we hope that on new shop it will work as it should.
Also installed:
Advanced Product Feeds,  Google Tag Manager,  Advanced SEO Suite,  GDPR,  Elastic Search Ultimate,  Automatic Related Products
Jazz
From United States
Game Changer
It is an absolute game-changer for any online store operating on Magento 2...
- intuitive setup process
- robust features
- amazing support
Manual & Support
Need more help?

Save time by starting your support request online and we'll connect you to an expert.

Frequently asked questions
chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

chevron-down chevron-right

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.

Changelog
Version 1.2.6Oct 15, 2026
Send Purchase event on a configured order status
Version 1.2.4Oct 9, 2026
Include tax in event value — New store-level setting under Stores > Configuration > Mirasvit > Facebook marketing > Facebook pixel (off by default). When it is on, item prices and the event value sent to Meta include tax, matching what the shopper pays. Shipping is never included. It needs Marketing Tracking (mirasvit/module-tm) 1.4.0 or later; with an older version, tax-exclusive amounts are sent as before.
Upgrading no longer stops on the old Hyvä package — If 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).
Version 1.2.3Sep 21, 2026
The helper classes Meta ships with the Conversions API are now loaded through Composer's own autoloader. Server-side tracking keeps working exactly as before on stores whose Composer autoloader is not optimized, and the module now passes Magento Marketplace's code checks.
Version 1.2.2Aug 31, 2026
Unset in_stock parameter from ViewContent event
Version 1.2.1Aug 27, 2026
Added value to ViewContent category pages and pixel validation
Reasons to choose Mirasvit
Client focusing and satisfaction

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.

Remarkable support

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.

Risk-free Investment

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.

Constant improvements and upgrades

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.

Comprehensive Documentation

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.

Unencrypted source code of our products

You can customize Facebook Pixel Magento 2 extension according to your needs and requirements.

Usability and Performance

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.

Ready for Magento Cloud

No core modifications. The Facebook Pixel Magento 2 extension has been tested in a Magento Cloud environment and is fully compatible with it.

Loading...