Back to Top

Tutorials


How to Install the Facebook Pixel


This snippet of JavaScript code is essential for companies who run Facebook advertising campaigns. By making use of that pixel, you will be able to create remarketing campaigns, targeting groups of people you want to re-engage, because they are already familiar with your company's offer.

We will make use of Google's Tag Manager technology, so you will need to have it set up first. Check the "Getting Started with Google Tag Manager", also available as a sample on our website, to get step-by-step instructions on how to do that. You will also need to have a Facebook ads account to follow along. Let's dive in!

1. Install the Facebook Pixel Helper, a tool that will allow you to verify if the pixel was set up properly.

2. Log into Facebook, and then choose the Ads Manager from the left side menu. Choose "Pixels" from the "Assets" tab, as highlighted below.

fbp1
3. Click the green button to create a new pixel.

fbp2
Give the pixel a name that's easy to remember. You will be able to rename it later, if you want to.

4. Then, select the pixel you've just created.

fbp3

5. Click the "Set up" button; you will be given three options to choose from. Pick "Use an Integration or Tag Manager".

fbp4

6. Then, choose "Google Tag Manager".

fbp5

7. Select "Quick Install", the option which will publish the JavaScript code straight to the Google Tag Manager. To start, sign in into the Google account you intend to use, and then allow Facebook to use it.

fbp6

8. If everything works as expected, you will see the Google Tag Manager listed in the "Google Tag Manager Installation" window. If you have several accounts, make sure to pick the proper one.

fbp7

9. It's time to choose the desired container.

fbp8

10. If you use Google's Tag Manager for the first time, it's best to keep the "Advanced Matching" switch toggled to "OFF", the way I did it in the picture below. Then, click the blue "Next" button.

fbp9

11. The following step allows you to add tags or edit existing tags. We're only interested in setting up our pixel code, so we will ignore this option for now.

fbp10
12. Let's hit the "Publish" button; our Facebook pixel will be published to the Google Tag Manager as soon as we do that.

fbp1113. It's time to verify if the pixel works properly. Open the website using a Chromium-based browser, and then click the Chrome extension we've installed at the very beginning of this SOP.

fbp12

14. This will open a window which shows that the pixel is installed; its ID should match what you're seeing in Facebook's Ad Manager section.

fbp13