How to Add Facebook Pixel to Magento 2 [Easy Guide]
Running Facebook ads for your Magento 2 store without adding the Facebook pixel code is not wise. Many store owners find it difficult to add Facebook pixel to Magento 2. Therefore, here is the complete guide for doing that manually without any extension.
Facebook pixel (a.k.a Meta pixel) is a piece of code that can help you track the behaviours of the visitors landing on your Magento store through Facebook ads. It tracks the actions of the visitors on your Magento 2 store that came through the Facebook ads that help refine the ad campaigns. It can also help create a lookalike audience base to maximize the performance and reach of the ad campaigns. In this article, I have provided a complete guide to adding Facebook pixel in Magento 2 through easy steps.
You can also read our blog on how to install Facebook Pixel in Shopify and with its help you can build your ad campaigns and measure your audience in the way you want.
Table of Contents
So, let’s begin!
How to Add Facebook Pixel to Magento 2?
You can use the below-mentioned steps to add Facebook Pixel code to your Magento 2 store.
Get the Facebook Pixel Code
First, we need to get the Facebook pixel code to add it to Magento 2 store. You can follow the below-mentioned steps to create Facebook pixel code.
- Step 1: Log in to your Facebook business account.
- Step 2: Go to the events manager and click on the ‘Connect a data source’ button.
- Step 3: Select the ‘Web’ option and hit the ‘Connect’ button.
- Step 4: On the next page, enter the pixel name and click on the ‘Create Pixel’ button.
- Step 5: On the next page, enter your website URL and click on the ‘Tick’ button.
- Step 6: Now, on the next page, choose the ‘Conversion API and Meta Pixel’ and hit the ‘Next’ button.
- Step 7: On the next page, select ‘Set up Manually’ and click on the next button.
- Step 8: Now, you’ll be provided with multiple options to install the Facebook pixel. Click on the ‘Install Code Manually’ button.
- Step 9: Your Facebook pixel code will be displayed on the screen. Click on the ‘Copy Code’ button to copy the Facebook Pixel code.
Add the Facebook Pixel Code to Magento 2
Once you have copied your Facebook pixel code, you can add it to your Magento 2 store using the following steps.
Step 1: Log into your Magento 2 admin panel.
Step 2: Head towards Content > Design > Configuration.
Step 3: A list of the store views will be displayed on your screen. Now, click on ‘edit’ against the applicable store view.
Step 4: Now, scroll down and expand the ‘HTML Head’ configuration and enter the copied Facebook pixel code in the ‘Scripts and Style Sheets’ field.
Step 5: Lastly, click on the ‘Save Configuration’ button at the top-right corner of the page to save changes.
That’s it! Now, you have successfully added Facebook pixel code to your Magento 2 store, and you are ready to track the Facebook ad performance.
Conclusion
Facebook is one of the most preferred ads platforms used by online businesses to reach a wide audience base. Running online ads on Facebook can turn highly profitable for your online business if optimized correctly. Installing Facebook pixel code in Magento 2 store can help track the actions of the visitors gained through Facebook ads. One can easily add the Facebook code in the header of Magento 2 by manually copying the code from Facebook and pasting it into the admin panel.
You may also love to read:
I hope this solution to add Facebook pixel to Magento 2 will help you! In case, you still have any doubts or queries regarding the provided solution, feel free to comment them. I would be happy to assist you.
Also, do not forget to share this useful Magento 2 solution with your friends via social media.
Thanks for reading.
Shivbhadrasinh Gohil
Shivbhadrasinh is the Co-founder & Chief Marketing Officer at Meetanshi. He leads the marketing team and is the person behind the marketing & branding success of the company. Being a seasoned digital marketer, he has been consulting online businesses for growth since 2010 and has helped 100+ clients with digital marketing success.
He loves sharing tips and insights about the latest digital marketing trends aimed at helping online business owners.
Prev
5 Best eCommerce CRM Software [2024]
8 Best Email Marketing Software for eCommerce [2024]
Next