Now that you know what you can track, and why you would want to do so, it’s time to create your pixel and put it to work on your website.
Step 1: Create your pixel
1. From your Facebook Ads Manager, click the hamburger icon (≡) and choose Pixels.
2. Click Create a pixel
3. Name your pixel, accept the terms, and click Next. When choosing the pixel’s name, keep in mind that you only get one pixel for each ad account, so the name should represent your business, rather than a specific campaign.
Step 2: Add the pixel code to your website
To put the pixel to work gathering information on your website, you now need to install some code on your webpages. There are two ways to do this depending on the tools you have incorporated into your website. We’ll use the copy-and-paste method here. The other option is to use an integration or tag manager.
1. Click Copy and Paste the Code.
2. Copy and paste the pixel base code into the header code of your website—that is, post it after the <head> tag but before the </head> tag. You need to paste it into every single page, or into your template if you’re using one. When you’re finished, click Next.
3. Copy the appropriate event code based on the actions you want to track on your website. For custom conversion code, click Custom Event. This Facebook help article can help you figure out which type of setup is best for you: basic, recommended, or advanced.
4. Paste the event code in the appropriate location on your webpage based on the action you want to track. It should go just below the </head> tag for a new page that opens as a result of the tracked action (like a thank you page). Or, you can attach the code to specific HTML elements like buttons that trigger actions within a page. When you’re done, click Next.
Step 3: Confirm your Facebook pixel is working
Before you start relying on the data from your Facebook pixel, you should confirm that it’s working properly.
1. Download the Facebook Pixel Helper extension for Google Chrome.
2. Visit the page where you have installed the Facebook pixel. If the extension finds the pixel, the </> icon will turn blue, and a popup will indicate how many pixels are found on the page. The popup will also tell you if your pixel is working properly. If not, it will provide error information so you can make corrections.
Also Read: The Facebook Pixel