How to add the Facebook pixel to your website

How to add the Facebook pixel to your website

1) If you haven’t already, you’ll need to create your Pixel. Start by visiting the Events Manager. Key in the keyword "Pixel" and choose Pixels.

2) Click the green Create a Pixel button.

3) Name your pixel, enter your website URL, and click Create.

When choosing the pixel’s name, keep in mind that with Events Manager, you only get one pixel for each ad account. 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 web pages. There a few ways to do this depending on what website platform you use.

  • If you use an e-commerce platform like Squarespace or a tag manager like Google Tag Manager, you can install your pixel without having to edit your website code directly. This Facebook Help article describes how to install your pixel if you already use one of those third-party tools.
  • If you work with a developer or someone else who can help you edit your website code, click Email Instructions to a Developer to send your developer everything they need to install the pixel.
  • If neither of the above options apply, you need to insert the pixel code directly into your web pages. That’s what we’ll walk you through in this section.
  1. Click Manually Install the Code Yourself.
  2. Copy-and-paste the pixel 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.