Website Building » WooCommerce » How Do I Integrate Facebook Pixels With WooCommerce?

How Do I Integrate Facebook Pixels With WooCommerce?

Last updated on October 1, 2022 @ 5:37 pm

Adding the Facebook pixel to your WooCommerce store can help you track conversions, optimize your ads, and build Targeted audiences for remarketing.

There are two ways to add the Facebook pixel to a WooCommerce store: Through a plugin or by editing the code yourself.

If you’re comfortable adding code to your site, we recommend editing the header.php file in your child theme. This will ensure that the code is not lost when you update your theme.

To do this, add the following code to header.php, replacing YOUR_PIXEL_ID with your actual pixel ID:


If you’re not comfortable editing code or don’t have a child theme set up, we recommend using the Insert Headers and Footers plugin for WordPress instead:

PRO TIP: If you are not comfortable with code or are not a developer, we recommend that you hire a developer to help you with this integration.

1) Install and activate the Insert Headers and Footers plugin from WordPress plugins directory

2) In your WordPress admin panel, go to Settings > Insert Headers and Footers

3) Paste your Facebook pixel code into the header section and click Save

4) That’s it! The Facebook pixel will now be installed on your WooCommerce store

5) Test it out by opening up your store in a new tab and then going to the Pixels tab in Facebook Events Manager

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.