How to add a Facebook pixel without a plugin Print this Article
What is a Facebook pixel, and why do you need one? Essentially the Facebook pixel allows Facebook analytics to track your site and to make more effective your Facebook ad campaigns. It is a fairly straightforward process. There are plugins that accomplish this, but they are certainly not necessary. Just follow these simple steps!
- The first step is to create the pixel through Facebook. You will need to log into Facebook, and then go to Facebook Events Manager, and find the :"Pixels" tab. This will open a pop up with a button that says "Create a Pixel", simply click on that button:
- After the pixel has been made you will see a few options for how to install said pixel. Select the "Manually install the code yourself" option. Copy the code:
- The last part is to add the code directly to the
header.phpfile. It needs to be an unbroken section portion, which is easiest if added to the end of the <head> section. It must fall between the <head> and </head> tags, and be between its own tags: