How to add Facebook pixel in Magento 2?

What is Facebook Pixel?

Facebook Pixel is an analytics tool, more specifically, a piece of Javascript code that you add to your site that you can use to measure ad effectiveness and study people's actions on your site. Facebook Pixel helps you maximize the effectiveness of your advertising campaigns by understanding the actions of people on your site from different devices.

How to add Facebook pixel in Magento 2?

The first step of how to add Facebook pixel in Magento 2 is to create a Facebook Pixel:

Step 1. Open Facebook Ads Manager.

Step 2. Go to the Pixel tab > Create a pixel.

Step 3. Define the title of the pixel and your site URL. 

Step 4. Set events and confirm them.

Step 5. Get your Pixel ID for later customization.

Step 6. Link your Facebook pixel to your Google Tag Manager account:

Step 7. Set your pixel code.

Step 8. Set Add Code with Affiliate Integration > Magento.

Step 9. Place the pixel code in the header of each of your pages. If you need more information, follow the pixel implementation guide.

After that, you need to install the Facebook Pixel extension and make the following configuration:

Step 1. Go to the General settings.

Step 2. Set Yes in the Enable Facebook Pixel setting to enable the module. After that, you will see other settings appear.

Step 3. Specify Facebook ID in the Facebook Pixel ID setting. 

Step 4. Choose Yes in the Log All Events Data setting to log data about the events you track.

Step 5. After that, you just need to manage the events you want to track.

How to optimize Facebook dynamic product ads in Magento?

The Facebook Pixel extension allows you to optimize dynamic Facebook product ads in Magento because this tool makes it much easier to measure the effectiveness of your ad campaigns. You get more relevant data about your customers' behavior, which makes it easier to decide which ads to keep, which to adjust, and which to remove.

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2021 Amasty. All Rights Reserved.