Why do I have 2 FB pixels?

Why do I have 2 FB pixels?

How to Implement Multiple Facebook Pixels on the Same Page with GTM

If you are using paid advertising to acquire new traffic, it’s very likely that you already use Facebook ads. However, if you don’t measure the effectiveness of your ad campaigns and just burn dollars hoping that maybe something is working, you’re doing it wrong.

If you use Facebook ads to acquire traffic, you need to use Facebook Pixel to measure the success of your campaigns. Whenever a visitor converts, you should track that conversion (e.g., lead, purchase, etc.) with the pixel.

But what if you’re working on a case where you have to send the data to multiple Facebook Pixels on the same page, e.g., one pixel is just for the department and the other one is for the entire company? In this guide, I’ll show you how to do that.

But first, there is a requirement for this solution to work – you’ll need to start using a Custom Template for Facebook Pixel. So if you have been working with the pixel for a while and have been using the Custom HTML tag, now is the best time to migrate to a more convenient way.

More tips on how to implement Facebook Pixel with GTM

In this blog post, I’ll focus solely on multiple pixels. But if you also want to learn how to track events, how to send additional parameters, user properties, etc., enter your email below and download my Facebook Pixel Cheat Sheet for Google Tag Manager.

Old vs New days

Back in the older days (pre-2019), the only way to install Facebook Pixel via Google Tag Manager was by using the Custom HTML tag template. This meant that you had to work directly with a JavaScript code, edit it a bit, etc.

These days, things are much simpler and more elegant because of the Facebook Pixel Custom Template (that is available in the GTM template gallery). It will make the entire FB Pixel tag management process more convenient and less prone to errors.

Add Facebook Pixel Custom Template

If you go to Tags > New (in Google Tag Manager) and search for “Facebook”, you will not find any tag template. That’s because, by default, no such tag exists in the GTM container. You have to add it manually.

Luckily, there is a very convenient feature called Community Template Gallery where anyone in the community (who can code) can create custom templates of Variables or Tags.

In Google Tag Manager, go to Templates > Tag Templates > Search Gallery and in the search field, enter Facebook.

Why do I have 2 FB pixels?

You will see this template, click it and add it to your Workspace. Once you do that, a new template will appear in the Tags > New > Custom section and you will be able to reuse it multiple times in multiple tags in the same container.

IMPORTANT: the template was originally developed by Simo Ahava but now it belongs to facebookarchive. 

Why do I have 2 FB pixels?

Implement your first Facebook Pixel tag

Everything starts with the basic implementation of the Facebook pixel. In other guides (especially in the older ones) found online, you might see a term called Facebook Pixel Base Code (or something similar). The next several steps that I’m going to demonstrate explain exactly that (but without using the term Base Code).

In GTM, go to Tags > New > Facebook Pixel and enter the following settings (if some fields are not visible in the screenshot, I did not change anything there):

Why do I have 2 FB pixels?

In the Facebook Pixel ID(s) field, enter your Pixel ID. Thanks to this field, GTM will know to which exact FB ad account to send this data.

If you want to set the tag to send data to multiple pixels, just enter them in the Facebook Pixel ID(s) field, separated with a comma, for example:

Why do I have 2 FB pixels?

If you want to track events with Facebook Pixel, you will need to create tags for each one of them. In those tags, you will also need to enter multiple Facebook Pixel IDs. To sum up, if a certain tag must send data to multiple pixels, you must enter multiple IDs in that tag.

Pro tip: use Constant Variable for FB Pixel ID(s)

Just as I have mentioned in the previous chapter of this blog post, for each interaction you want to track with the Facebook Pixel, we will need to create a separate FB Pixel tag.  In every tag, you will need to define a Facebook Pixel ID.

Eventually, you might end up with 50 (or even more) tags that send data to Facebook. This means that you will have to manually insert the Pixel ID 50+ times. But what if one day, you have to switch to another Pixel ID? You will need to manually change the ID 50+ times.

Why do I have 2 FB pixels?

To make things more optimal, you could create a GTM variable that contains your FB Pixel ID and then just reuse the same variable every time you need it. Once you need to change the Pixel ID, you’ll need to do that just once — in the Variable.

In GTM, you go Variables > User-defined Variables > New > Constant and paste your Facebook Pixel’s ID.

Why do I have 2 FB pixels?

Since we are talking here about Multiple Facebook Pixels on the same page, you could include all of the Pixel IDs in the Constant Variable, like this:

Why do I have 2 FB pixels?

And then use that variable in your Facebook Pixel tags. Open them one by one and insert the Constant Variable instead of plain Pixel ID.

Why do I have 2 FB pixels?

Or you can separate multiple Constant Variables (each one of them contains a single FB Pixel ID). This will also work.

Why do I have 2 FB pixels?

Time to test

Now, it’s time to make sure that you have implemented everything correctly.

GTM Preview and Debug mode. In GTM, enable the Preview and Debug mode, then refresh the page where you want to install Facebook Pixel with Google Tag Manager.

At the bottom of the screen, a debug console will appear. If you want to test the Pageview tag, click the Pageview event on the left side of the debug console and you should see that your Facebook Pixel tag has fired.

Why do I have 2 FB pixels?

Click it and check whether all of the Pixels are displayed there:

Why do I have 2 FB pixels?

Facebook Pixel Helper. The previous tip does not mean that everything was sent to Facebook Pixel properly! There are other places we need to check. One of them is Facebook Pixel helper. Install it and you will see this icon appear in the top right corner of your Chrome browser. Once you refresh the page AND if Facebook Pixel is implemented on a page, its color will change to blue and you will see a number within that icon.

Click that icon and let’s check. You should see green icons next to your events/pageviews and you should also see that Pixel helper has identified both pixels with no problems/warnings.

Why do I have 2 FB pixels?

Facebook Pixel Reports

In Facebook Business Manager, go to Events Manager > Data Sources > Select your first pixel and then Test Events.

Why do I have 2 FB pixels?

Enter the URL of your website (if I was working with my site, I would enter https://www.analyticsmania.com) and click Open Website. After you are redirected to your own website, go back to the Test Events of your Pixel and check whether you see Pageviews coming from your own device. If nothing appears, go back to your site and refresh the page once again.

Why do I have 2 FB pixels?

Then go to your 2nd Pixel’s Test Events section and check whether everything is displayed there properly too.

If everything is fine, this means that you have implemented Multiple Facebook Pixels on the same page propertly with Google Tag Manager correctly.

Frequently asked questions about multiple Facebook Pixels on the same site

In case you just skimmed the article, here is a semi-summary in the shape of frequently asked questions.

Can you have multiple Facebook pixels on one website? Yes, you can have multiple Facebook Pixels on a website and Facebook Pixel’s Google Tag Manager template handles that automatically.

Why do I need multiple Facebook pixels? One of the reasons might be different departments in a company. Each one of them might have separate pixels, plus you might want to have one company-wide pixel.

How do I add multiple Facebook pixels to a website? In a nutshell, you will need to install a Facebook Pixel custom template to your Google Tag Manager container and then enter multiple pixel IDs in the same tag. The template will then handle all the other technical nuances for you.

Final Words

With Custom Tag Template for Facebook Pixel (created by Simo Ahava), the implementation of the pixel has become much easier and quicker. If you must work with several pixels, just enter their IDs (separated with a comma) in every pixel tag.

If you are still working with the Custom HTML tag, I highly recommend that you switch to the custom tag template as will save you more time in the long run + will be less likely to cause errors.

If you want to learn more about how to properly implement Facebook Pixel, download my Facebook Pixel Cheat Sheet for Google Tag Manager below.

Can I have more than 1 Facebook pixel?

Create a new ad account within a different Business Manager account, or create a new ad account that isn't part of a Business Manager account. Then, you can create 1 new pixel in your new ad account. You can also assign permission for the new ad account and new pixel to your Business Manager.

How many Facebook pixels should I have?

Facebook allows you to create up to 100 pixels in your account. However, you don't need that many pixels unless you have hundreds of websites with different audiences. One Facebook Pixel with sufficient data is enough to improve ad targeting and create more effective Facebook ads.

How do I get rid of unwanted pixels on Facebook?

Remove Pixel.
Select the Pixels tab..
Hover over the pixel you want to remove and click Remove..

How do I fix pixels activated multiple times?

Error 4: 'Pixel activated multiple times' To fix this: Ensure you have used the Facebook pixel base code just once on each page that has an event you'd like to track; If you have event code on your website, don't place it several times on the same page.