Go to https://www.facebook.com/events_manager/ and click Set Up Pixel. Choose the manual option and click to copy the code.
Here’s a quick video show how it works:
Go your WordPress website domain and end it with /wp-admin to log in after entering your password. Add the “Insert Headers and Footers” plugin and click Settings, Insert Headers and Footers.
Paste your pixel code in the Header area, then save.
Install the Chrome Extension “Facebook Pixel Helper” from https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc
Visit your website and ensure the pixel is tracking page views. If you receive an error, make sure you’ve disabled any ad blockers and refresh the page.
Install your pixel on your site even if you’re not running ads. Eventually, you’ll want to run ads to people who visited your website, or people who are similar to those who visit your website (with a “look alike audience”). Give Facebook as much data as possible by setting up your pixel early.