Why do we use Facebook Pixel

What is the Facebook Pixel - Basics, Legal Aspects, Installation and Custom Audiences

If you want to do professional marketing on Facebook, come on Facebook pixel not over. It is the basis for so much that you need in your daily work and we refer to it in many articles. However, we have never described it in more detail - especially for beginners.

What is the Facebook Pixel?

From a purely technical point of view, the Facebook Pixel is a short piece of JavaScript code that you integrate on your own website. You get the code from Facebook and it is personalized to your advertising account.

You use the pixel to create a connection between your advertising account and your website. After installing the pixel, Facebook knows who has accessed the relevant website. This makes sense for several reasons - for companies - because you can then, for example:

  • Measure the success of your ads better because Facebook not only sees who actually arrives on the website after clicking on the ad. It is also measured when an interaction such as a purchase, a download, ... is carried out.
  • You can make your campaign better with the pixel, because you no longer optimize only for clicks or reach, you optimize for real purchases or leads.
  • You can see the success of your campaign across all devices. If a user has seen your campaign on their smartphone and later orders something on their laptop, Facebook can still assign it correctly.
  • The pixel is the basis for creating target groups based on your website visitors. This means that you can address people on Facebook who have previously viewed product XY on you. (= Custom Audiences)
  • In combination with a product catalog, Facebook can even create advertisements completely automatically. This happens, for example, when you browse for new shoes somewhere in the online shop and they are then later advertised to you on Facebook in the news feed.
  • You can also use the pixel to exclude target groups - for example those who have already bought your product.

How is the Pixel installed?

It's not rocket science, but yes, you will need minimal technical understanding and access to the appropriate website. If you have an advertising account, the process is pretty simple:

  • In the Advertising Manager / Business Manager you will find the Facebook Pixel under Tools
  • Click once on Create Facebook Pixel, there you get three options
  1. Integration with a tag manager. Tag managers are tools that help you integrate multiple pixels. For example, if you also use a Twitter pixel. To do this, of course, you must first have integrated the tag manager on the website. The Google Tag Manager, for example, is good and free.
  2. Install manually yourself. Here you get the code and can then install it yourself.
  3. Send the code and instructions to the developer. For everyone who doesn't do something like this themselves, but has it done.

Let's assume option 2. There you will receive a code, which you then integrate into the website as described on Facebook. This is then the simplest version of the integration.

You can find detailed instructions in the Facebook Help:


Test Facebook Pixel

You can test whether it really works with the Facebook Pixel Helper. This is a small extension for Chrome that shows you whether and which pixels are integrated on a website.


Use Facebook Pixel with events

If you have integrated the code on your website, this is already a basis. The pixel becomes significantly more useful if you install it on the website with so-called "events".

An event is a specific interaction that a user carries out on your website. You can tell Facebook whether the user has just made a purchase, signed up for the newsletter, ... and in the end better measures your conversion because you can see directly how many of these conversions your campaign has generated.

You create these events in the second step when creating a pixel:

There are the following events:

  • Purchase (here you can also transfer the value of the product), Generate Lead, Complete Registration, Add Payment Info, Add to Cart, Add to Wishlist, Initiate CheckOut, Search, View Content, ...

Only through these events can you get even more out of the performance of your campaigns.

Create pixels yourself or have them created by the service provider?

Now you've roughly seen how a pixel is installed. Often, however, the question arises whether you do it yourself with your own pixel or simply use the pixel of a service provider / agency.

As a rule, we would definitely recommend creating a pixel yourself! Then you have full control over this pixel, you can work with several service providers and in the event of a change you can continue directly without long breaks.

All you have to do is install the pixel yourself and then share it with your partner. If you are in the settings of your Business Manager, you will also see the pixel as a separate asset in the left bar. There you can then add a partner:

Your partners can then use the pixels as normal.

Create custom conversions with the Facebook pixel

It gets a little more complicated, but also cooler, when you create custom conversions with your pixel.

This only works after the installation. With a custom conversion, you apply certain rules to existing events.

In other words, you say, for example, that the conversion “Sold concert ticket Munich” only comes into effect if the URL also includes “Munich”. You can completely determine the rules yourself and combine them as you like.

The pixel in the Business Manager

Once installed, you will also see a nice overview of your Pixel in your Business Manager. There you can see how often which event has been triggered in the last few days:

There you can also see the code again or change the setup of the pixel.

Create custom audiences based on the Facebook pixel

What you want is not only to install the pixel, but also to create your own target groups based on the pixel. If you are in the overview, you will see a small button "Create Custome Audiences" above the statistics, which will guide you through the process:

The easiest way is of course to simply create a target group from all visitors to your website. But you can also do a lot more there and create target groups when specific pages have been called up or your website has been called up particularly often, triggered an "event" on the website, or or ...

Once you have created these target groups, they are automatically and continuously updated by Facebook - your website also has constant new visitors. Once saved, you can then access the target groups when creating the campaign.

At this point, however, we will no longer explain how exactly you create a campaign.

Beginner tip: Also think of target groups that you would like to exclude. This means that you also create target groups of people who have already bought your product and then exclude them from your campaign. Then you as a user do not see the shoe that you have already bought as an advertisement for another week.

Beginner tip 2: Custom audiences can also be created from your own data. You can read how to do this here. Or even from a Facebook event.

Legal aspects of the Facebook pixel

That would also be worth a completely separate article and we have related articles here in the blog that you should read through:

As always, it is complicated here in Germany. The GDPR doesn't make it that much easier, but it hasn't changed everything either. The advantages of the pixel are worth it, however.

The short version: you have to inform your visitors that you are using the pixel. You have to give your visitors the opportunity to object. You'd have to at least adjust your privacy policy, but it's best to read the article linked above.


Use the pixel, it's worth it. When you've left these basics behind, you'll have a lot more features and tricks to familiarize yourself with.

(This post was published for the first time in October 2015 and has been updated several times. Comments are retained.)