Facebook Retargeting Pixel

Every retargeting project requires a trigger - a method to understand which individuals to target based upon an action they have actually taken. With a lot of retargeting platforms, this is done by including a tracking pixel to your site. Facebook is no exception - they have actually produced the aptly-name "Facebook Pixel". This more recent pixel changes the old ones that you may have utilized in the past.

This short article will stroll you through the best ways to get the facebook retargeting pixel code, ways to include conversion tracking occasions, and where to include it to your site.


Go to the Facebook Advertisement Supervisor and pick Pixels from the Tools Menu:

facebook retargeting pixel


If you have actually never ever produced any of Facebook's previous pixels (Conversion, Custom-made Audience, and so on), then you will be asked to "Produce a Pixel". Click the button and provide the Pixel a name. Because there is just one per account, I advise simply including your service name in front of it, so it would check out "Idea Labs Facebook Pixel". You can constantly relabel it later on.

When the pixel is developed, you will have the choice to "Set up Pixel Now" or "Email Pixel Code." We will examine both choices quickly.

creating a new facebook pixel


If you had an old pixel rather, Facebook will instantly have actually produced a brand-new Facebook Pixel for you. The brand-new Facebook Pixel code and syntax is a bit various than previously, so it might make good sense to change any existing use of it on your site with the more recent code instead of attempting to retrofit the brand-new performance into the old pixel code. (Facebook offers a guide on ways to retrofit it, if that is exactly what you have to do.).


Now that you have a Facebook Pixel, let's have a look at it. You can do this by clicking the "Install Pixel Now" button if you simply produced it, or by picking "View Pixel Code" from the Pixels menu. In either case, a dialog creates your personalized code:

viewing the facebook pixel code

This block of code has to be contributed to all the pages of your website. The highlighted line is the vital part - it lets Facebook understand that somebody has actually gone to a particular page. You will utilize this for producing clever Custom-made Audiences in the future. However, this is simply among numerous actions you can track.


Facebook offers numerous basic occasions, noted in the table listed below:

the standard facebook pixel events

These basic occasions are included after the PageView occasion to signify that the visitor has actually taken some essential action. Which occasions you utilize depends on you and how you specify your very own workflows, however the most basic occasion to utilize is Lead. Include it to your Thank You pages - the one that visitors see after they submit a deal type on your site. Here is exactly what the code would appear like for including the tracking to those Thank You pages:

The base Facebook Pixel code snippet with the Lead standard event added

Keep in mind that the Lead occasion ought to be included the very same location as the PageView occasion whenever possible. Nevertheless, some site CMS software application does not make this simple to alter on a page by page basis. In this case, include the code with simply the PageView occasion in it to every page on your site, then include another little code on the pages you wish to track leads on like this:

The Facebook Pixel code snippet with only the Lead standard event


Facebook likewise supplies a method to produce custom-made conversion tracking without the additional basic occasions, utilizing URL matching. To be truthful, I choose the concept of Custom-made Conversions, since it suggests that you do not need to do anything to your site beyond including the routine PageView Pixel code. All the specifics are carried out in the Facebook Advertisement Supervisor, similar to practically each retargeting platform.

Nevertheless, there are 2 huge concerns with Customized Conversions:

  1. You can just have 20 of them.
  2. They can never ever be altered or erased.

Those are quite considerable! So, pick carefully and utilize them when the kinds of basic occasions do not satisfy your requirements or if it would be too tough to utilize them to record the conversion. You are likewise enabled to utilize both, so you do not have to stress over overlap.

Here is exactly what the Customized Conversion dialog appears like:

The dialog for creating a Custom Conversion for the Facebook Pixel


The Facebook Pixel code simply has to be included the  area of each page. You likely currently have some tracking code included for Google Analytics, so you can simply include this code after that. You can likewise click the Email Pixel Code button and send it to your web group to include. Make certain to inform them where you desire the basic occasions to be utilized.
click to read more: Facebook Analytics Tools
Or, you can utilize the Google Tag Supervisor to rapidly and quickly include it. Facebook supplies a terrific guide for this. The most essential thing to bear in mind is that you have to set each basic occasion tag to fire after the PageView code tag utilizing Tag Sequencing.


As soon as you have your Facebook Pixel code set up on your site, you need to check it. There are 3 methods to do this, each described listed below.


After users go to pages on your site where the Facebook Pixel is filled, Facebook will start to reveal life in the Advertisements Supervisor. Return to the Tools -> Pixels alternative the menu, and you must see something like this on the ideal side. The Green circle with Active methods that the pixel is shooting someplace.

Showing the status of the Facebook Pixel

Now, take a look at the chart and tables left wing. Take a look at Occasions to see if your Page View and other basic occasions are shooting. Then take a look at URLs to see where they are shooting. If you do not see the occasion or URL that you are anticipating, either no one has actually gone to those pages or the Pixel isn't really set up properly.


You can raise the Designer Tools performance of your web browser and take a look at the Network tab to see whether your pixels are shooting.

The Network tab of Chrome Developer Tools showing the Facebook Pixel events

Sort by name and try to find occasions that begin with? id=. You can see which occasion is being fired in the URL. You will likely see 2 occasions - one for the fbq() call and one for the  after it. This is typical, and Facebook will just count this as one occasion.


Facebook likewise supplies a helpful Chrome extension that reveals exactly what Facebook Pixel occasions are being fired and the number of. It likewise can assist repair typical concerns, such as numerous pixels, or cannot load.

When you have the extension made it possible for and go to a page on your site with the Facebook Pixel, it will reveal a count in the icon of the number of pixels were packed. Clicking the icon will turn up a dialog with information which occasions fired:

This can be exceptionally helpful for seeing if your conversion tracking basic occasions are shooting when you anticipate them to. You must see one occasion for each that fires, however Facebook well combines the fbq() call and the  tag into one occasion.

This extension can be quite useful for finding out exactly what is going on. At one point on our site, the extension was revealing 2 pixels discovered, and one had a various id than I anticipated. A little examination revealed that a tracking pixel from AdRoll was including its own Facebook tracking pixel behind the scenes.

After following the actions above, you ought to now have a working facebook retargeting pixel set up! This is an actually crucial turning point, due to the fact that it indicates that Facebook has actually likewise begun gathering details about who is visiting your site and which pages they are seeing. We will be utilizing this details in the next post to establish Custom-made and Lookalike Audiences, which will be the basis for our retargeting projects.