: Is there a way to protect against some other site copying your Facebook pixel tracking id and messing up your targeting? A Facebook pixel helps to build a narrow / targeted custom audience
A Facebook pixel helps to build a narrow / targeted custom audience focused on people who visited my website (this is really important).
The things is: everyone can see my FB pixel ID on my webpage (it's in the source!).
Now what if someone wants to ruin my custom audience by using this script with my own FB pixel ID on a crappy website that has lots of visitors?
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '<MYKEY>'); // Insert your pixel ID here.
fbq('track', 'PageView');
</script>
Then my custom audience (using my FB pixel ID) will be "polluted" by lots of visits to the crappy website.
Then any retargetting campaign will be focused on these random visitors (who didn't visit my website but the crappy website). Then I will get a low conversion rate, causing the lost of ads-money.
Is there really no way to protect against this?
More posts by @Murphy175
1 Comments
Sorted by latest first Latest Oldest Best
Hopefully no one has it in for you to do this!
You can place your FB script in a JS file and load it on appropriate pages with a script tag; that way, the actual script won't appear on the page. You can go one step further and minify the code in the file, or better yet, obfuscate your code. There are many tools for this. Here's one: javascriptobfuscator.com/ (will minify and obfuscate it). Be sure to then run tests on your FB tag, to ensure that it still works properly.
You can also use Google Tag Manager to load the FB tag. That won't obfuscate it, but it will keep from loading the actual tag in your source code.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.