Skip to main content

If you advertise on Facebook to generate traffic or conversions on your website and you don’t have the Facebook pixel installed, you are not giving your Facebook Ads campaigns a chance to really succeed… and you are probably throwing a large part of your budget in the trash.

Installing the Facebook pixel on your site is not an option: it is an absolutely INDISPENSIVE step to exploit the full power of Facebook advertising.

And yet, I often see advertisers who have installed the pixel in a hurry on their site or who have badly parameterized it. As a result, these advertisers are limited to the time of audience creation, retargeting or campaign optimization.

Today, I will therefore answer the following questions :

Enjoy reading and/or listening!—Pourquoi-et-comment-installer-le-pixel-Facebook-sur-votre-site-web-e4an26


Listen on Apple Podcasts | Google Podcasts | Spotify | Deezer

What is this Facebook pixel?

Very concretely, the Facebook pixel is a piece of code, about fifteen lines of code in Javascript, that Facebook provides to each advertiser once it has created an advertising account on the platform.

Here is what the Facebook pixel code looks like (the sequence of numbers framed in red represents the identifier of your pixel):

Voici à quoi ressemble le code du pixel Facebook

This is the basic pixel code, which must be installed on ALL PAGES on your site. It is to be distinguished from the event code, on which I will come back a little further down.

Why is it called a pixel ?

Because it’s an image that’s 1 pixel wide by 1 pixel high, so it’s almost invisible, and it loads when you visit a web page or when you open an email. In fact, it allows the person who set this pixel to track certain user activities, for example to know if an email has been opened or if a web page has been visited. And so it allows us advertisers to retrieve data as part of our digital marketing or email marketing activities, or simply to analyze our website traffic.

The best known and most widespread example is the Google Analytics pixel. Most websites have installed the Google Analytics pixel, a free solution provided by Google to have very complete data on the traffic of a website, the time spent, the pages visited, the origin of the traffic, the actions performed on a site, etc..

What is the Facebook pixel used for?

The Facebook pixel, which I will now call the pixel for simplicity, is a tool that allows Facebook to collect information about what is happening on your website and to link this activity to your Facebook Ads campaigns.

Without the pixel, Facebook has no way of knowing what’s going on on your site and therefore cannot guess that someone who clicked on one of your Facebook ads then went to buy a product on your site, for example.

So as soon as you create an advertising account, Facebook provides you with this tool for free and encourages you to set it up on your website.

Once installed, every time someone will visit or perform an action on your site, this information will be traced back to Facebook.

From that moment on, you will be able to do a lot of very interesting things for your targeting and for the optimization of our campaigns.

Here are the 5 main applications of the Facebook pixel:

1. Measuring conversions to know if your ads are working

People click on your Facebook ad and come to your website, but do they perform the action you want (example: click on a button, create an account, fill out a form, buy a product)? The pixel will allow you to track important actions performed on your site after clicking on one of your ads.


2. Optimize your campaigns to generate more conversions


Once Facebook knows what type of person is converting on your website, Facebook’s advertising algorithm can help you improve the performance of your acquisition campaigns by optimizing your targeting and showing your ads only to those most likely to convert.

3. Create audiences of visitors to your site based on their behavior

All visitors to your website are not equal: a person who stays 10 seconds on your home page vs. a person who came back to your site 3 times in the last week and consulted 5 articles do not have the same level of interest for you.

You will therefore be able to create audiences, i.e. segments of your visitors according to their behavior. For example: :

  • regular readers of your blog
  • people who have visited your site in the last 6 months but have not returned for 30 days
  • people who have purchased at least once in the last two months
  • people who have added product X to the cart without buying it in the last 24 hours

4. Retargeting

Le retargeting (ou reciblage publicitaire en français) permet de montrer des publicités uniquement aux Lookalikes (or Similar Audiences) Audiences (all individuals or particular segments as detailed above) to encourage them to return (to complete a purchase, for example).

5. Create Lookalikes audiences

Lookalikes’ (or Similar Audiences in French) are one of the most powerful targeting features of Facebook Ads. They allow you to find people with profiles similar to those who already visit your website to increase the reach of your acquisition campaigns without tearing your hair out on the interests to target.

Wouldn’t you like to be able to target people who have similar characteristics to the people who already buy on your site?

But before we go into more detail about these applications, let’s see how to install this magic pixel on your site.

How to install the Facebook pixel on your website

I hope I’ve made your mouth water with these possible uses of the pixel. You may be wondering how to create this pixel and how to put the code on your website.

Don’t panic, I’m telling you everything.

First you’ll have to generate the code for your pixel, then you can install it yourself or have it installed by a provider.

Generate my Facebook pixel

If you have just created your ad account on Facebook or if you already have an ad account but you have not yet generated your pixel, it’s very simple. You go to the hamburger menu at the top left of the screen, you click on Measure and report then Pixels.

If you have already created your pixel, you will see a screen with the name of your pixel, the number of events received by your pixel recently and a curve of the activity of your pixel.

Dashboard pixel Facebook 1

Si vous ne l’avez pas encore créé, vous verrez un écran qui vous propose de le faire.


Generer mon pixel Facebook - écran1

You click on Create a pixel, you give a name to your pixel (the simplest: “Pixel [name_of_my_site]”), you click on Create.

Generer mon pixel Facebook - écran2

That’s it, you’ve generated your Facebook pixel!

Generer mon pixel Facebook - écran3

As you have understood, the Facebook pixel is linked to your advertising account since its purpose is to link your Facebook Ads campaigns to your website activity. So each ad account has one pixel and one only.

Where can I find the code of my Facebook Pixel?

From the home screen of the pixel, you click on Details. You will arrive on this screen :

Dashboard pixel Facebook 2

You click on Configure at the top right and then on Install the pixel code yourself, manually.

Les 3 façons d'installer le pixel Facebook sur un site web

You go down to section n°2 and there you see the code of your pixel.

Copiez le code du pixel Facebook

This code is the same for everyone, except for a sequence of about 15 digits, which is the ID of your pixel. It is this sequence of numbers that makes your pixel unique.

Now let’s see how to install this pixel on your website. There are three ways to do this:

  • Connect a partner platform
  • Install the pixel code yourself, manually
  • Email instructions to a developer

Connect a partner platform

The best way to install the pixel on your site is to use one of the integrations offered by Facebook.

If your site has been created on one of the most commonly used platforms on the web, you will be able to install the pixel without having to touch a line of code.

To facilitate the installation of the pixel on these platforms used by millions of companies (such as WordPressPrestashopWix or Shopify), Facebook has developed integrations with these platforms so that their users can install the pixel themselves without technical knowledge and without going through a provider to do so.

On the menu Configure your pixel, click on the 1st option Connect a partner platform and you will see the list of platforms for which there is integration.

Pixel Facebook : connecter une plateforme partenaire

Currently, Facebook offers integrations with the following platforms:

  • 3dcart
  • Bandzoogle
  • BigCommerce
  • Drupal
  • Ecwid
  • Eventbrite
  • Google Tag Manager
  • Hubspot
  • Jimdo
  • Joomla
  • Kajabi
  • Magento
  • OpenCart
  • PrestaShop
  • Segment
  • Shopify
  • Squarespace
  • Storeden
  • Webflow
  • Wix
  • WooCommerce
  • WordPress

I’m not going to explain how to install the pixel on each of these platforms here, it would be a bit too long, but I’m going to focus on the main ones: WordPress, Prestashop, Jimdo, Shopify, Wix and Eventbrite. I’ll also tell you a word about using the Google Tag Manager.


If you’re like 25% of the websites in the world (!) and you’re using WordPress to administer your site, installing the pixel will be very simple.

You click on WordPress, Facebook offers you to download the ‘Pixel Facebook’ extension, a .zip file that you will need to install directly from your WordPress admin console.

Télécharger l'extension Pixel Facebook pour WordPress

This plugin works very well and will allow you to use the pixel-based settings functions.

Another option is to use a third party plugin. This is what I do for my site, for the simple reason that I have always used third party plugins that work very well and that existed before Facebook offered this integration.

I have two to recommend:

Both plugins are free. Unfortunately they only exist in English, but they are really easy to use.

Once you have installed the plugin, you go to the plugin’s configuration interface and just enter your pixel ID in the corresponding field.

Comment paramétrer votre pixel ID dans Pixel Caffeine
Pixel Caffeine : Add your pixel ID in the field “Manual Setup”.
Comment paramétrer votre pixel ID dans PixelYourSite
PixelYourSite : Add your Pixel ID in the “Add your Pixel ID” field.

As soon as you have validated, the plugin will install the pixel code on all the pages of your site.

Prestashop, Jimdo, Shopify, Wix

Install the Facebook pixel on ShopifyPrestashopJimdo and Wix is quite simple. Just click on the platform logo in the integrations page and follow the instructions.

At some point, you will arrive to a section Facebook Pixel or Facebook Analytics and you will just have to fill in the ID of your pixel in this field.

Intégration du pixel Facebook dans Prestashop
Facebook pixel integration in Prestashop
Intégration du pixel Facebook dans Jimdo
Integrating the Facebook pixel into Jimdo
Intégration du pixel Facebook dans Shopify
Integration of the Facebook pixel in Shopify
Intégration du pixel Facebook dans Wix
Integration of the Facebook pixel in Wix


This is a bit out of the scope of your website, but I’m talking about it anyway because it’s very useful.

If you use Eventbrite to organize an event, and if you’re doing a Facebook ad that redirects people directly to your event page on Eventbrite without going through your website, it’s handy to be able to track the activity on Eventbrite to see how many people are visiting the event page or signing up.

Here again the integration with Facebook is well done: click on the logo Eventbrite in the integrations page and follow the instructions. At some point you will see a section Tracking Pixels where you can add your pixel ID.

Eventbrite : pixel facebook 1
Eventbrite : pixel facebook 2
Eventbrite : pixel facebook 3

Google Tag Manager (GTM)

If you use Google Tag Manager (or GTM) To manage your website’s tags, you can easily add your Facebook pixel code to your GTM account.

Simply log in to your GTM account, select your website and then click on Add a new tag. Then you click on Custom HTML Tag (custom HTML tag) and type a name for your tag (e.g “Facebook Pixel”).


You will retrieve the code of your pixel as shown above, copy it and paste it into the GTM HTML container.

In the drop-down menu Advanced Settings, please specify Once per page under Beacon Triggering Option and All pages under Trigger on.

Click on Create a tag. There you go, you’re good !

Manual installation

The second option is manual installation. This is not complicated in itself but it still requires you to be a little comfortable with the technical part of your website.

If you don’t know anything about HTML that you’ve never developed a website and you’re not very technical, I strongly advise you to skip this section and go to the next ones. Otherwise, this is the best way to crash your site!

If you know a little bit about the technical side of things and you feel confident to go and modify the code of your site yourself, here’s how to do it. The idea is to install the basic code of the pixel on all the pages of your site so that the pixel follows the activity of your entire site.

Always in the section Install the pixel code yourself, manually, you are going to copy the entire pixel code and paste it into the header of your site, so between the header tags on each page of your website, precisely at the bottom of this section just above the tag</head>.

Installez le code du pixel Facebook entre les balises de votre site web

The Facebook pixel code can be added above or below other tracking pixels (such as Google Analytics) in the header of your website.

Have the pixel installed by an external provider

Last option: if the word “code” makes you sweat, it might be best to get help from someone who will install the pixel for you.

Ideally, you should talk to the person who created your website, be it a developer, a web integrator or a web design agency.

On the Configure your pixel menu, click on the 3rd option Send instructions by email to a developer.

Simply fill in the email address of your provider, and this person will receive an email with detailed installation instructions that will allow them to install the pixel for you.

Comment envoyer le code du pixel Facebook à un développeur

Warn them anyway because otherwise they might think the email is a Facebook ad and not pay attention to it.

Setting up event

Once you set the Facebook pixel on your site, Facebook will know who among its users is coming to your site. The problem is that Facebook will track all visits indiscriminately.

That’s good, but it’s not enough, because it’s not a very fine tracking.

In reality, not all visits are the same. There are visits on some pages that are more important than others. You will not give the same importance to :

  • A visit to your home page
  • A visit to the confirmation page to subscribe to your newsletter
  • A visit to a confirmation page after a purchase

The only way to let Facebook know that there is a whole range of actions that can take place on your site and that they are not all the same is to set up events. Facebook defines an event as any action on your website that can be tracked, such as when someone clicks a button or views a particular page.

So with the pixel, you will be able to identify events that are important to you and assign them categories that reflect the action of a visitor, for example when this event is triggered, it means that the person has filled out your contact form or the person has added an item to the shopping cart.

By adding events, you will allow Facebook to show ads to people who are likely to perform a specific action (a conversion) or to create audiences of people who have triggered a specific event. You can also add settings that convey unique information, such as the name of a product, a product category or the euro value of a purchase.

To create events, you have three options:

  • Use the Facebook event configuration tool
  • Setting up standard events
  • Create custom conversions (from a URL)

Using the Facebook Event Configuration Tool

Facebook has launched this tool to allow everyone to set up events on its website, including the less technical people.

The promise of the ‘Event Pixel Setup’ tool is simple: “No code is needed, you just browse your website to track events that match your customer journey, we find and highlight buttons that you can follow”.

Simply put, you will be able to set up events that correspond to a URL (a thank you page, for example) or a button (Download or Add to cart, for example).

I must say that in the latter case, this tool is really great! I had never been able to correctly set up an event on a button myself, but with the event configuration tool I did it in 2 minutes.

Here’s how to do it.

Still in your Pixel menu, you click on Configure and then on Create new events. You will arrive on this screen :

Créer des évènements avec le pixel Facebook

You enter the URL of your website and click on Go to website. The event configuration tool then launches in the browser with your website.

You can now scroll through your pages and the tool will suggest events that you might want to track, such as the sign up button for my newsletter :

Click Check next to each suggested event and select Confirm or Ignore. You can also specify what type of event should be associated with this action.

To add events that do not appear in the list of suggestions, go to your website as usual to find the buttons or web pages to follow.

Select Follow a new button or Follow a URL, and follow the on-screen instructions.

With this tool, you can very easily add events to specific buttons or URLs. Why URLs?

Page URLs are useful to avoid pixel triggers when form errors occur. For example, if you set a purchase event to a Buy button, the pixel is triggered every time a customer clicks on it, whether or not the purchase is successful. If you set up the purchase event on your website’s thank you page, the pixel triggers a purchase event only when a customer completes an order and is directed to that page.

Setting up standard events

Facebook offers a dozen standard events that correspond to most of the actions that take place on a website :

  • Purchase made
  • Prospect generated
  • Registration closed
  • Payment info added
  • Add to cart
  • Addition to the wish list
  • Payment initiated
  • Search
  • Content View
Liste des évènements standard du pixel Facebook

To set up these events, you will need to add to the basic pixel code (the one you have already installed) on the relevant pages an additional piece of code that corresponds to the event you want to track on the pages in question.

For example, here is the code for the event « personalized audiences » :

Pixel Facebook : code de l’évènement « Inscription terminée »

You can add additional information such as the reference or price of a product.

AJouter au code d'évènement standard des paramètres d'évènement complémentaires

The more details you fill in at the beginning, the more options you will have in creating your events audiences personnalisées.

Create custom conversions

There is a 3rd option but I find it a bit duplicative with the use of the event configuration tool.

Here again, no additional code to install, the basic pixel code is enough. And you can create the custom conversion simply from a URL.

Créer une conversion personnalisée simplement à partir d’une URL

For example, if you want to create an event that is triggered every time someone fills out your contact form, you go to the hamburger menu of your Business Manager, then into Custom conversions, then you click on Create a custom conversion and there you just have to indicate the URL of your post-form thank you page. So if when someone fills out the contact form on my site the person is redirected to a page whose URL is, you indicate this url in the url contains field, then I give it a name (eg “Prospect”) and There you go !

In fact you create a rule: if the page whose URL is X loads, then trigger the Y event.

Check that my Facebook pixel is working well

That’s it, did you manage to install the Facebook pixel on your site? Well done !

Before claiming victory, it is still better to make sure that it is properly installed.

For that, you have several possibilities :

  1. You go to your site, you browse through several pages. Then you go back to the Pixel section of your ad manager and see if your pixel status is defined as « Active ». If so, you’ll also see the graph showing the total pixel traffic appear and you’re good to go !
  2. You can use the Ads Manager Event Testing tool of the ad manager. You will be able to verify that your events are properly configured and working correctly by triggering them on your website (which you will open in a second window of your browser). The tool is well done because it only detects the events that you trigger, not the activity of other website users.


Outil test d'évènements du pixel Facebook

Finally, I recommend that you manually verify that the pixel is installed correctly on your site using the extension Facebook Pixel Helper, developed by Facebook and only available on Chrome. Once installed, just go to the pages of your site that you want to check and the Pixel Helper icon will activate if everything is ok and the tool detects a pixel on the page.

A tip: make sure that the pixel ID that is displayed corresponds to the ID of your pixel.

That’s it! If you’ve read this far, you’re usually done installing the Facebook pixel on your site. No matter how you do it, the most important thing is to put this pixel on your site as soon as possible.

Now let’s take a closer look at how you will be able to exploit the possibilities offered by this tool.

What you can do with the Facebook pixel

Now that the pixel is well installed and correctly set up on your website, let’s take a closer look at three concrete (and very powerful) applications.

Track conversions to see if your ads are working

Now that Facebook knows the conversions that can take place on your site, since you have set up events for each of these conversions, you will see these conversions appear in your ad statistics.

Let’s imagine that I organize a conference to which people can register with a form on my site. My goal is to promote this conference and get as many people as possible registered. I launch a Facebook ad with a nice visual and a very convincing text about the interest of coming to this conference. People who click on the ad are directed to the registration form on my site.

Thanks to the Facebook pixel, I will see in the statistics of this campaign not only the number of people who have been exposed to this ad, the number of people who clicked on this ad… and the number of people who filled out the registration form. I will also be able to see in these statistics the cost per conversion, i.e. how much it costs me to register for my conference.

Optimize your campaigns for conversion

One of the types of campagns that you can use in Facebook Ads is a campaign with a conversion objective.

Un des objectifs de campagnes que vous pouvez utiliser dans les Facebook Ads est un objectif de conversion

In this type of campaign you need to tell Facebook the exact goal you want to achieve. And this final goal is defined by a conversion event.

The advantage of this type of campaign is that Facebook will know exactly who is converting. The more conversions there are, the more Facebook will understand what type of profile is converting. And the more Facebook will be able to direct the distribution of your ad to people who are likely to convert within your target audience.


Optimiser un ensemble de publicité pour générer plus de conversions

Here we touch the real strength of Facebook Ads: it is when you use the big data and the machine learning algorithms of Facebook that your Facebook ad campaigns will really perform. (waow, 3 keywords in one sentence )

Create audiences of visitors to your site based on their behavior

You will now be able to create personalized audiences from your website traffic, that is, subgroups of all your site visitors, which you can then use as you see fit.

To do this, you go to the hamburger menu at the top left of your Business Manager, you select Audiences, Create an Audience, Personalized Audience then Website traffic.

audiences personnalisées à partir du trafic de votre site web

And there you will be able to create the following audiences :

Les différentes audiences personnalisées à partir du trafic d'un site web

So you’re going to be able to segment your site’s traffic and create different segments depending on the activity of the people who visit your site.

Here are some examples of the audiences you can create :

  • All visitors to your site in the last 30 days
  • People who have read several articles on the same topic
  • People who have visited a page describing a product or offer, but not the next page you would like them to visit (page « Prices » or « Fill out this form to get more information »)
  • People who have started a purchasing process without completing it
  • People who came to your site 3 months ago but haven’t returned for 1 month (to re-engage visitors who might be interested in what you do)
  • The 10% of the visitors of these last 6 who spent the most time on your site
  • People who have visited your blog at least 5 times in the last 2 months
  • Buyers who have spent at least 100 euros in the past month

Interesting, isn’t it ?

The objective here is obviously to retarget these people. I’ll tell you more in this complete guide to Facebook personalized audiences.

Small precision: all the audiences that you will create here can be included or excluded from your targeting. For example, you can create an audience of people who have subscribed to your newsletter (by creating the audience of people who have visited the thank you page) and exclude it from any campaign to acquire subscribers to your newsletter.

You just need to know that the pixel keeps the traffic data of your website for 6 months, so you will be able to create this kind of audience going back 6 months at the most.

Afterwards, you will be able to create Similar audiences (or Lookalikes)) at these hearings. I’ll explain that too in a future article.


I have explained everything you can do with the Facebook pixel and I hope I have convinced you of the need to quickly install it on your site (if you haven’t already done so) or to better set it up with standard and custom conversion events.

With a well set up and well used pixel, Facebook offers us incredible targeting possibilities and can help us optimize our campaigns to get more conversions. It would still be a shame to miss it, wouldn’t it?

Finally, I strongly advise you to set up the pixel on your site… now!

Even if you don’t intend to launch Facebook Ads campaigns today, it doesn’t matter, install the pixel today.

That way, if for example in 6 months, you decide to start advertising on Facebook, the pixel you install today will have accumulated data and you will be able to reload the people who came to your site in the last 6 months from your first campaign.

Or you can ask Facebook to target a new audience of people who look like these engaged visitors.

If you have a question on this technical subject, don’t hesitate to ask me in comments.

Good pixel!

Article published on :

par : Joseph Donyo

Leave a Reply