Jakub Gombár
AI Team Leader & Co-Founder
The Facebook pixel is a piece of code placed on your website to track site visitors. The pixel lets you target campaigns at people who visited your site (Facebook remarketing/retargeting), or target people who visited only a particular page, and so on.
Every ad account should have one pixel. The code consists of two main parts: the base pixel code and the event code. The base pixel code tracks all traffic to your pages. Event codes are further pieces of code you can add beneath the default pixel code on particular pages of your site, letting you track certain actions on those pages, such as registrations or completed purchases.

If you do not yet have an FB pixel, creating one in your Business Manager is very simple (a guide to creating a BM is HERE).
1. In the left-hand menu click Business settings.

2. Then choose Data sources, then Pixels in the left-hand menu, and click the Add icon.

3. In the window that appears, fill in the pixel name and the web address you are creating the pixel for, and click Next. To find your bearings more easily where there are several pixels, I recommend naming it after the site the pixel will sit on.

4. The next window shows 2 options; we choose the first one to carry on with the setup.
1. First open your GTM account. In the left-hand menu click Tags and then New on the right.

2. A new window opens; click Tag Configuration.

3. Then click the gallery, where we will look for a suitable template for our FB pixel. Templates can be built or chosen from predefined ones. This set of features helps make creating tags simple and clearer still. You can read more about templates HERE.

4. In the top right corner click the magnifying glass and search for "facebook". Then click the "Facebook Pixel" template. We use Simo Ahava's templates, which have always served us well ;)

5. The template's detail appears; at the top right click Add to workspace.

6. The Tag Configuration window appears again, where you fill in the Facebook Pixel ID. You will find that ID in BM – Business settings -> Data sources -> Pixels.

7. Once the FB Pixel ID is filled in, click Triggering below the Tag Configuration box.

8. Choose the "All pages" trigger, name the tag and save it.


1. In the left-hand menu click Variables and then New.

2. A window appears; click Variable Configuration and choose the variable type "Constant".

3. Enter the FB Pixel ID as the value, name the variable and save.

4. From then on you need not copy the ID into your tags every time; you can select it by clicking the plus.

5. Ta-daa! Just save it and you are done :)

The last and very important thing you still have to do is publish everything. At the top right click "Submit", then "Publish" and then "Continue" or "Skip".

As we mentioned at the start, the Facebook pixel gives us important information we can use to build better Facebook ads and target them better too. With the pixel set up we can measure site traffic, build remarketing audiences and so on. It helps us improve the conversion rate of Facebook ads and achieve a better return on investment.
The latest trends, proven practices and analyses from the digital world. Find out how to take your technology and marketing growth further.
And don't forget to check out Invelity Extras – you'll find a marketing glossary, useful tools and plugins to make your work easier!
Invelity Extras