Skip to content

Commit

Permalink
keep facebook out of tracking stats
Browse files Browse the repository at this point in the history
  • Loading branch information
FuhuXia committed Sep 23, 2024
1 parent 6d1ff97 commit f47d7ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proxy/nginx-goodbot200.conf
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# prevent top 6 bots from entering data into /_tracking
# prevent top 7 bots from entering data into /_tracking
## Googlebot/
## Y!J
## Yeti
## Bytespider
## Applebot
## HeadlessChrome
## facebookexternalhit and developers.facebook.com

set $botstracking 0;

if ($uri = "/_tracking") {
set $botstracking 1;
}

if ($http_user_agent ~ 'Googlebot/|Y!J|Yeti|Bytespider|Applebot|HeadlessChrome') {
if ($http_user_agent ~ 'Googlebot/|Y!J|Yeti|Bytespider|Applebot|HeadlessChrome|facebook') {
set $botstracking "${botstracking}1";
}

Expand Down

0 comments on commit f47d7ff

Please sign in to comment.