How to install the Facebook Pixel on your website?
It's a question that keeps coming up: how do you install the Facebook Pixel on your website? In order to answer this question, we have developed this complete guide that will explain how to install the pixel on your site depending on the CMS you are using. Because yes: there are several ways to place the pixel on your site, and they depend on the technology behind your site.
What is the Facebook Pixel?
First of all, what is the Facebook pixel? The Facebook Pixel is a tag, i.e. a few lines of code, placed on your site that allows you to track the actions of your visitors. The goal: to know how your visitors react once they have clicked on one of your ads. Which pages do they visit? Do they add products to their basket? Do they place an order? The Facebook pixel will allow you to recover very useful data to pilot your campaigns with maximum efficiency.
The second use of the Facebook pixel is retargeting. Each time a user visits your site, Facebook detects him thanks to the pixel. You can then retarget them to encourage them to convert. A user who is already familiar with your brand is much more likely to trust it and place an order. You can even go as far as retargeting users who have added products to their shopping cart without validating them, by offering them a promotion on these same products!
As you can see, the Facebook Pixel is an essential tool for those who want to manage their Facebook Ads campaigns and do growth hacking on Facebook. But one problem remains: its installation often poses problems. Let's find out together how to install the Facebook Pixel on your site depending on the CMS you use.
How to create your Facebook Pixel?
The first step is to create your pixel. Indeed, each pixel is unique. When you create your Facebook Ads account, you have the option of creating a dedicated pixel, to be placed on the site(s) you will be advertising on.
Creating your Facebook Pixel is easy. In your Facebook Business Manager, click on All Tools > Business Settings.
Then click on "Data source", then "Pixels" in the menu that appears. You will be taken to a dashboard that lists all your existing pixels with the option to create a new one. Click on "Add" to create your Facebook pixel and follow the steps indicated.
First you have to name your pixel. Then you have the option to connect it to your website. We'll come back to how to do this later: you can skip this step for now.
Click on "Continue". And... that's it. It's as simple as that. Your pixel is now created. All that remains is to install it on a site.
Install the Facebook Pixel on Wordpress
Wordpress is now used by nearly 70% of the websites on the web, so it is logical to start with this case. If you want to install the Facebook pixel on Wordpress, nothing could be easier. There are even several ways to do it.
The first is to go through the Business Manager, again. When you select "Install Pixel" in the Event Manager, you have the option to choose partner integrations. Wordpress is listed, as are most of the popular CMS's on the market. Select it and follow the few steps described. With a few clicks, your pixel is installed and activated. Nothing could be easier.
The second method, if you don't want to use partner integration, is to install a specific plug-in on your Wordpress site. There are several types of plug-ins: plug-ins dedicated to the Facebook pixel, or simply plug-ins that allow you to inject tags into the header of all your pages. We recommend the latter: a single plug-in will allow you to install your Facebook Pixel, but also Google Ads or Google Analytics tags (or any other tag you may need). One of the most popular plug-ins is called "Head and Footer Scripts" and will allow you to install all these tags on all your pages with a simple copy and paste.
Once the plug-in is installed, you just need to retrieve the Facebook Pixel code from your Business Manager and copy it into your Wordpress header. It's child's play!
Install the Facebook Pixel with Woocommerce
If you are doing e-commerce with your Wordpress site, you may have opted for a very popular plug-in: Woocommerce. You can always install your Facebook Pixel as described above. But if you use Woocommerce, there are other methods.
First, the Facebook Business Manager offers a partner integration specifically for Woocommerce. You can find it again in the same place as for Wordpress: All Tools > Event Manager > Partner Integrations, in the "E-commerce" section. Installing the Pixel with Woocommerce will allow you to create a dynamic catalogue: you will not have to add your products by hand, they will load automatically. You will then be able to easily create advertisements around these products.
Again, only a few clicks are required to install and activate your pixel.
Install the Facebook Pixel on Shopify
Shopify is one of the leaders in e-commerce. The brand is booming and has an increasing number of followers. So it's no surprise that it's on the list of Facebook partner integrations. To install your Facebook Pixel on Shopify, go to the partner integrations menu and select Shopify. You'll need to log in to your Shopify account and install the Facebook channel.
Facebook will then take care of connecting your pixel to your site via this channel. As simple as that!
Install the Facebook Pixel on Prestashop
Prestashop is also one of the partner integrations offered by Facebook Ads. In the pixel configuration menu, go to "Partner integrations" and select Prestashop.
The steps are a bit more numerous than on other CMS, but Facebook will guide you through them.
- Install the "Official Pixel Facebook" modules from the Modules menu of your Prestashop Admin.
- Click on "Configuration" and in the dedicated field, paste your pixel.
- Check that the connection is working from the Facebook Manager interface
- Set up the events you want to track
Congratulations: your Facebook pixel is installed on your Prestashop site.
Install the Facebook Pixel via GTM (Google Tag Manager)
If you study the partner integration system in detail, you will see that there are many other CMS that Facebook supports. If you don't, you can always place the code on your website.
There is still one last case to study. When you have several tags to place on your site (Google Ads, Facebook Pixel, Google Analytics...), it is common to use GTM, or Google Tag Manager. This allows you to centralize all your scripts in one, connected to your GTM account. Here is how to set up your Facebook pixel from GTM.
Sign in to your Google Tag Manager account. You will need to create a new tag. You have two options:
- Either select 'Custom HTML' and simply copy and paste your pixel code into the
- Either you select the "Facebook Pixel" tag, which is a tag already set up for pixels.
Both are valid and work very well. Don't forget to activate it on all pages of your website with an "All Pages - Page View" trigger. This way, every time a visitor loads a page on your site, the pixel will also be triggered. You will be able to follow all his actions and check that he fulfils certain conversions.
For your Facebook Ads problems, call on GrowthYouNeed
Do you want to improve your Facebook Ads skills? You've come to the right place! GrowthYouNeed is a growth marketing agency with several specialties. Among them: Facebook Ads and growth hacking on Facebook. Tell us your problem and we will be happy to answer you.