We recommend using the free PixelYourSite plugin to easily and correctly install the Facebook Pixel on your website. Here are the instructions on how to do that.
Create Your Pixel
Start by navigating to your Facebook Events Manager → Data Sources (www.facebook.com/events_manager/). Click Add New Data Source and choose Facebook pixel.
Give your pixel a name and enter your website URL. Facebook will suggest some options to integrate the pixel into your site. Skip the suggestions as we don’t need them.
Locate Your Pixel ID
Facebook should bring you straight to the pixel screen after you create it. But if you need to find it again, navigate to www.facebook.com/events_manager/ and be sure to select the correct account.
Then navigate to Events Manager → Data Sources and click on your pixel listing. This will bring you to the Overview screen where you can find the pixel ID (refer to the screenshot below)
Install the PixelYourSite plugin
Configure PixelYourSite Settings
Navigate to the PixelYourSite settings screen.
Copy and paste your Pixel ID from the previous step into the field. Scroll down to click the Save Settings button and you’re done. Advanced users may want to tweak some additional settings, but that is pretty much all you need to install your Facebook Pixel.
If you operate in a country where you must limit the personal data collected from your visitors, you should perform these additional steps.
Navigate to PixelYourSite → Google Analytics Settings and enable the Anonymize IP setting. Don’t forget to save settings.
Install and activate the Cookie Notice for GDPR & CCPA plugin. Navigate to PixelYourSite → GDPR and activate the Cookie Notice plugin integration.
Read more about how to get your website GDPR compliant
Get more out of PixelYourSite
We highly recommend watching the introductory video for PixelYourSite to get the most out of this excellent plugin. Besides Facebook Pixels, it can also add tracking codes for Google Analytics, Pinterest tag, Google Ads and Bing UET.
The Pro version will give you powerful advanced features like multiple pixels, track any clicks and interactions, the ability to hide pixels on specific pages and more.