Tracking Chef
  • Guides
    • Google Ads
    • Google Analytics
    • Google Tag Manager
    • Google Data Studio
    • Facebook
    • LinkedIn Ads
    • Hubspot
    • Segment
    • Quora Ads
    • Reddit Ads
  • Blog
  • GTM Playground
  • Swag
  • About
  • Guides
    • Google Ads
    • Google Analytics
    • Google Tag Manager
    • Google Data Studio
    • Facebook
    • LinkedIn Ads
    • Hubspot
    • Segment
    • Quora Ads
    • Reddit Ads
  • Blog
  • GTM Playground
  • Swag
  • About
Tracking Chef
  • Guides
    • Google Ads
    • Google Analytics
    • Google Tag Manager
    • Google Data Studio
    • Facebook
    • LinkedIn Ads
    • Hubspot
    • Segment
    • Quora Ads
    • Reddit Ads
  • Blog
  • GTM Playground
  • Swag
  • About
  • Guides
    • Google Ads
    • Google Analytics
    • Google Tag Manager
    • Google Data Studio
    • Facebook
    • LinkedIn Ads
    • Hubspot
    • Segment
    • Quora Ads
    • Reddit Ads
  • Blog
  • GTM Playground
  • Swag
  • About
Managing multiple Facebook Pixels on one site
Home » Facebook
May 26, 2020 Yan Kotliarsky

Properly setting up your Facebook Pixel is one of the most important tasks when advertising on Facebook. The pixel helps in measurement and optimizing your campaigns, as well as enabling Facebook to create highly relevant audiences for the business.

In most cases, setting up the pixel is straightforward (see the guide here) and you will only need to add relevant conversion actions along your funnel. But in some cases, advertisers might need to implement multiple pixels, which require a different setup.

Pro tip:
If you’re using Google Tag Manager with the Custom Template Tag for Facebook (by Simo Ahava), you’re in the clear

Who would need multiple pixels

A classic example for this can be a publisher that works with multiple advertisers. For example, a publisher in the field of Higher Education might want to give pixel access to a section of his site. So “Economics studies” section will have pixels for the publisher’s pixel Advertiser A, while the “Social studies” section might have pixels for the publisher and Advertiser B.

Another example can be with a large brand that works with multiple agencies, each requiring to fire different pixel on various sections of the site.

Both examples are from actual clients I’ve worked with.

The issue with multiple pixels

If all pixels on the site are tracking the same behaviors, then there’s no problem at all. But if some actions should be restricted only to some pixels, it can get messy.

Let’s understand why.

Say Agency A want to track a conversion with a Lead event, while Agency B wants to use a Custom Event called Step4.

The standard pixel setup would look something like this:

Agency A

<script>
...base code...
  fbq('init', '1234567890');
  fbq('track', 'Lead');
</script>

Agency B

<script>
...base code...
  fbq('init', '9876543210');
  fbq('trackCustom', 'Step4');
</script>

Loading these two scripts one after the other will result in the following events being triggered:

PixelPageViewLeadStep4
Agency A (1234567890)🗸🗸🗸
Agency B (9876543210)🗸🗸

The Step4 event will trigger twice, firing on both pixels.

This is due to the fact that both pixels that loaded on the page will respond to the fbq(‘track’) function, so the data will be sent to both.

Sending data only to a specific pixel

The solution, introduced by Facebook in November 2017, is to instruct the fbq() function to only trigger a certain pixel ID for the specific action.

This new method, trackSingle and trackSingleCustom, works just like the standard track and trackCustom fbq() methods, but also takes a parameter for the pixel ID.

For example, a PageView tag in the new method will add the pixel ID right before the action.

fbq('trackSingle', '1234567890', 'PageView');

Going back to the previous example, with a simple update to the code, we can make sure that the right action is sent to the right pixel.

Agency A

<script>
...base code...
  fbq('init', '1234567890');
  fbq('trackSingle', '1234567890', 'Lead');
</script>

Agency B

<script>
...base code...
  fbq('init', '9876543210');
  fbq('trackSingleCustom', '9876543210', 'Step4');
</script>
PixelPageViewLeadStep4
Agency A (1234567890)🗸🗸
Agency B (9876543210)🗸🗸

The Step4 event will trigger once, only for the pixel defined.

About the Author

Yan Kotliarsky View all posts by Yan Kotliarsky

Marketing specialist. VP of Marketing accessiBe, making the world accessible to people with disabilities one site at a time.

« Previous
Next »
2 Responses
  1. Vince
    Reply
    July 30, 2020 at 8:32 am

    Very clear explanation and easy to understand! Kudos to you Yan Kotliarsky!

  2. Alberto
    Reply
    August 26, 2021 at 11:48 am

    Thanks for the very detailed article. I have one question: is it possible to track multiple pixels (coming from different accounts and triggered on different pages of the same website) without having the domain verified for each of the account who owns the pixel?

    For example. Let’s suppose to have the website http://www.example.com, and to have company 1 who wants to track a pixel on the page /one, company 2 in page /2 and so on. None of these companies can have the example.com verified as it is Can be verified only by the company Example.

    Many thanks

Leave a Reply

Click here to cancel reply.

Contents hide
Who would need multiple pixels
The issue with multiple pixels
Sending data only to a specific pixel
Made with ❤️ by Elad Levy
Disclaimer: Some of the links shared on this site are affiliate links, so if you choose to make a purchase, I’ll earn a small commission. Please note, I only recommend tools I’ve used and have found useful, the commission is not a driving factor