Track the behavior of your visitors with the Facebook pixel

Do you have a website that offers your services or products and a lot of visitors viewing your pages? 

Well, this is already a very good thing, because it means that your activity is visible online and that you attract prospects. 

Having said that, I imagine that you would like to know who visited your website, who are these prospects, where do they come from (Google, social networks…), what are they doing on your site … So many questions that deserve an answer! 

This is why today we are offering you a tutorial on integrating a Facebook pixel that will help you collect data to better understand the behavior of Internet users on your site (views of content, clicks on addition to the basket…)

There are different ways to integrate a Facebook pixel on a website such as installing the pixel code manually in the head tags of the pages of your site or using the Facebook assistant, in this tutorial, I suggest you learn how to do it with Google Tag Manager.

Wondering why do it with Google Tag Manager rather than with Facebook directly or some other method? 

First of all, because Google Tag Manager is a free tracking tag management system that has been designed to allow you to analyze your website traffic and optimize its marketing. 

Second, because it allows you to quickly and easily update your tags and tracking codes on all pages of your website with just a few clicks! 


If you are still in doubt here is a short official presentation of Google Tag Manager: 

Well, let’s not get too late, here is the tutorial to integrate an FB pixel and follow personalized events on your site through GTM.

Important information to follow the Tutorial! 

To perform this tracking operation on your site, you must have the following elements: 

  • profile on Facebook
  • an account on Facebook Business Manager
  • Google Tag Manager account
  • The chrome extension ”  facebook pixel helper ” 

First step: Creation of the FB pixel 

Before you can obtain information on the behavior of visitors to your website you must be able to collect data on these visitors (GDPR compliant).

To do this, you must first go to your Facebook business manager and perform the following actions to create your pixel:

  • Click on the Other tools tab in the left side bar 
  • Click on Event manager .
  • Click on Connect data sources in the left sidebar.

Then follow the steps of the different Facebook windows which will guide you:

  1. Select the “Web” source
  2. Click on Facebook Pixel and fill in the information of your new pixel (Name of your pixel + url of your website) 
  3. Select the type of partner integration you want to do (in our case, choose Google Tag Manager)
  4. Click on the “Activate advanced automatic correspondence” button if you want Facebook to help you expand your site’s audience.
  5. Select your Google account (the one with which you created your Google Tag Manager account) then select the container (your website) 
  6. Indicate the url of your website to complete the creation of your facebook pixel (do not close the window)

Second step: Publication of the Facebook pixel 

To start your data collection, you must first publish and install the Facebook pixel for it to be functional.

Go to your Google Tag manager account for this and check that in the Tags tab your new Pixel appears in the Facebook pixel id format with a series of numbers.

Then publish your new Facebook pixel, by first clicking on the blue send button at the top right of your Google Tag Manager dashboard.

To do this, you must indicate the name of the version of your Google Tag Manager tag (for example “Add Facebook Pixel”) then click on publish.

Third step: Checking the implementation of the Facebook pixel

To verify that your pixel has been added to your website, go to your website and click on your Facebook pixel helper extension.

Step Four: Checking that the Facebook Pixel Works

To be able to test your pixel, and verify that your pixel is performing well by transmitting event information from your website to Facebook, you will need to create a new tracking event for your website. 

To do this, go back to your Facebook screen and click on Test Events in Events Manager.

Then click on the overview tab then on the gray add event button then on ”  from the pixel  ” to launch the Facebook events configuration wizard.

Follow the guided procedure (indicate your website URL, access the website, then choose an item on your site to follow).

If you are already comfortable with the event management tool, you can also click on the green button created and in the drop-down menu select “create a personalized conversation” to fill in the fields.

How to follow an event on your website? 

Before you set up anything, first ask yourself which event you want to track and why? 

Remember in the introduction, when we told you that the pixel could record actions such as views of content, clicks on add to cart …

Then, once you know what you want to track and why choose to follow a new button or follow a URL.

To follow a new button 

First, click on follow a new button.

You should see your site buttons appear highlighted, select the button you want to follow by clicking on it.

Then indicate to Facebook the type of button by selecting an event (for example add to cart if you have clicked on the add to cart button) and click on confirm.

To follow a url

Go to the page you want to follow and then click on the following URL.

Then, tell Facebook the type of button by selecting an event (for example contact if you have selected the contact form URL) and click on confirm.

Now it’s your turn! 

We hope that this tutorial has enabled you to set up a follow-up of your visitors to better understand their actions on your website with your new Facebook pixel and Google Tag Manager.

Did you follow our advice but are stuck on a stage? Or do you want personalized support to go further? 

Contact our SEO experts directly to set up advanced tracking of your showcase or e-commerce site! 

Leave a Comment

Your email address will not be published.