Categories
Advertising Facebook Ads

Facebook ads: Why using multiple pixels and pixel plugins can create huge problems

Someone on Facebook Ad Buyers posted the attached pic but then deleted the post just as I was explaining. So here it goes:
 
First, you should know that FB-pixel is an open door to heavy manipulation. It’s easy to fire pixel multiple times and for plugins to fire YOUR pixel. I have not tested yest, but I am pretty sure you can fire competitors pixels from pages you control and completely mess them up. I’m white hat only so I don’t wanna do this, but I have have sites scraping my content and republishing everything elsewhere including the pixel integration.
 
The standard way to fire pixel is:
 
fbq(‘track’, ‘ViewContent’);
 
Notice that the above does not state WHICH pixel if you have many. The above fires ALL pixels available from the same firing.
 
If you have multiple pixels you should do this:
 
fbq(‘trackSingle’, ‘FB_PIXEL_ID’, ‘ViewContent’;
 
TrackSingle = track only for the explicitly stated pixel FB_PIXEL_ID
 
I was using Perfect Audience that had their own pixel in their tracking and it was triggering my pixel too, and vice versa. I was fighting this for weeks and found the issue myself by dissecting various javascripts involved from both FB and Perfect Audience. This while people involved said “it’s impossible that these highly valued companies would make such potential errors”. The f*cked up thing is that you can’t make settings in FB to only allow “trackSingle” method for your pixel. You can also not filter out domains to prevent others to fire your pixel. You can block domains AFTER you noticed they use your pixel, but you can’t set preemptive filters such as “allow only on mywebsite.com/*”
 
Facebook touches the issues very lightly here, however it does not point out the potential nightmares and wrong data that this can cause: https://developers.facebook.com/docs/facebook-pixel/advanced
 
This issue can also over-report by several magnitudes.
 
Why does this happen? Because FB pixel functions are made “globally accessible” (google “programming function scope”. So whatever functions triggers from one javascript plugin will have access to ALL instances of FB pixel javascript running. And when this is run: fbq(‘track’, ‘ViewContent’); then it actually means “run this for all pixelsID defined”. Pure madness in my opinion.
 
There are variations in the scope between various browsers and javascript engines. So the issue can be non-existent on, say Android, and rampant on iPhone.
 
If you don’t know programming or javascript think of this like this: You are at a restaurant, there are more than one waiter. Everytime someone wants to place an order then shout it out loud but the waiters don’t know who shouted out the orders so they all (or those that heard) register the order. If you ever have been confident that FB is over-reporting or stuff just does not make sense, then this could be it. Use https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc?hl=en Everything should be firing perfect. Please note that the pixel helper does NOT tell you about the issues causing the problem. Again, pure madness. It’s easily done.