Closed sumanthratna closed 4 years ago
We can only analyse the user-agent that is set by the server. I don't think there is anything we can "fix" here unless i am misunderstanding the issue? 😕
My understanding is that we cannot classify the second hit as a crawler, but we can for the first. The first hit specifically mentions GTmetrix and the URL. Further, the website classified the first hit's user-agent as a crawler, so I'm unsure why it doesn't work on my server.
I installed via composer; this is what I'm trying:
When I run GTmetrix on my site, I get two different hits: one has GTmetrix in the user agent header, and the other looks like a real user. When using the online service, I see that the first hit is correctly identified as a crawler and the second isn't (the second actually is a crawler but I don't think there's anything that can be done about it since it looks real).
Here's what's written to the logs:
What I would expect is:
Loading the class with
new \Jaybizzle\CrawlerDetect\CrawlerDetect()
(note the parentheses) returns the same incorrect results.Output of
php -v
: