Skip to content

Instantly share code, notes, and snippets.

@mweber-ak
Created September 20, 2017 15:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mweber-ak/2decc1b2f255978dd66e7598f8553327 to your computer and use it in GitHub Desktop.
Save mweber-ak/2decc1b2f255978dd66e7598f8553327 to your computer and use it in GitHub Desktop.
Facebook Ad Approval Bot Exclusion for Google Analytics
Enter this text as a filter for your views.
This will stop the massive spikes of fake traffic that occur from Facebook's bots when you create new Facebook Ads.
Go to Admin > Filters > Set a New Custom Filter > Exclude > IP Address
In the Filter Pattern enter:
^173\.252\.96\.([0-9]|1[0-9])$|^173\.252\.88\.([0-9]|1[0-9]|2[0-1])$|^173\.252\.64\.([0-9]|1[0-9])$
NOTE: Test on a different view first to ensure data lossage will not occur. I'm not responsible if it does.
@mweber-ak
Copy link
Author

If you're like me and use Analytics and run lots of FB ad's you know about the massive 300 hit waves of Bots that wreck your GA statistics due to the false traffic. This alleviates that issue by filtering their bots from view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment