Log-Hero.com Plugin
See which search engines, AI crawlers and other bots visit your site, and what they find.
Install in
Log Hero
Do you want to know which bots visit your site, and what they find there? Log Hero records every request your server answers and turns it into a clear picture of how search engines, AI crawlers and all the other bots move through your site.
Because the plugin works on the server, it sees what a tracking script never will. Crawlers do not run JavaScript, so they are invisible to ordinary analytics. Log Hero catches every one of them, including the requests to robots.txt and your sitemaps, the 404s they run into and the redirects they follow. No downloading log files, no grep.
Search bots, AI crawlers and everything else
Next to the classic search engine bots, Log Hero recognises the AI crawlers that now make up a large share of automated traffic, and it tells you which is which:
- Search engines such as Googlebot, bingbot, YandexBot, Amazonbot and Sogou.
- AI crawlers and assistants such as GPTBot, ClaudeBot and ChatGPT-User.
- SEO tools such as AhrefsBot and SemrushBot.
- Social networks and link previews such as facebookexternalhit.
Bots that identify themselves with an unknown user agent are grouped so you can still see how much traffic they cause.
Where your data lives
The data is available in two places, and you can use both.
In the Keyword Hero app. A bot activity dashboard: hits, error rate, how many bots are active and how fast your site answers them, daily traffic split per bot, the paths that get crawled most and the errors bots run into.
In Google Analytics 4. Log Hero pushes the data into your GA4 property, so you can build your own explorations across bot name, landing page and status code, and combine bot traffic with the rest of your reporting.
What you can analyse
Everything below is included, there is no paid tier holding features back.
- The path each bot requested, so you can see what gets crawled and how often.
- The bot name, checked against the IP address rather than taken at face value, so a crawler claiming to be Googlebot has to prove it.
- The user agent it identified itself with.
- IP addresses, used for that verification (see “External services” below for exactly what this plugin transmits).
- HTTP status codes, to find broken links, redirect chains and server errors.
- Response times, so you can see how long your site kept a bot waiting.
- The request method.
- Referrer and channel, to see how bots reached a page.
- Sessions and users, so you can follow a bot through your site the way you would a human visitor.
- Spam bots, marked as such, so you can tell junk traffic apart from the crawlers you care about.
Analysis in Google Analytics 4
Because the data lands in your own GA4 property, it stays yours and remains available even if you stop using Log Hero.
- Free form explorations across bot name, landing page and status code.
- Filtering and segmentation, regular expressions included.
- Export to Sheets, Excel or CSV, and access through the GA4 API.
- Dashboards and alerts alongside your existing reporting.
Monitoring critical technical issues
Log Hero helps you to identify many issues concerning technical optimization of your site and can derive quick action items to resolve these.
- Which bots crawl my site and how often?
- Which orphan pages has my site that are never crawled?
- Which status codes does my site return to search engines?
- Are my robots.txt and sitemap.xml crawled by search engine bots?
- How long does the bot need to download the resources of my site?
- Which AI crawlers read my content, and how much of my traffic do they account for?
- How much traffic never reaches my analytics because it does not run JavaScript?
- and much more. Visit log-hero.com! for more information
External services
This plugin relies on Log Hero, an external service operated by Cross Platform Solutions GmbH. The plugin has no function without it: its only purpose is to forward request data to that service, which then makes bot and crawler traffic visible in your analytics account.
What is sent, and when
The plugin registers a handler on the WordPress shutdown action. For every request served by your site — from bots and from human visitors alike — it collects the following data about that single request and transmits it to the Log Hero API at https://in.app.log-hero.com/logs:
- The host name of your site.
- The protocol used (http or https).
- The requested path, including its query string.
- The HTTP request method.
- The HTTP status code your site returned.
- The User-Agent header sent by the client.
- The Referer header sent by the client, if present.
- The IP address of the client, unhashed. Log Hero uses it to verify whether a request really comes from the bot it claims to be (published IP ranges of the bot operators and reverse DNS).
- The timestamp of the request.
- The time your site needed to generate the response, in milliseconds.
- Only for requests that carry a Web Bot Auth signature (cryptographically signed requests from AI agents and crawlers, see RFC 9421): the Signature and Signature-Input headers and the values of the headers the signature covers, usually Signature-Agent. These headers are sent by automated clients, not by browsers of human visitors. Authorization and Cookie headers are never transmitted, even if a signature covers them.
Filtering bots from human visitors happens on the Log Hero side, not in the plugin. The IP address of every visitor is therefore transmitted, not only that of bots. Depending on your jurisdiction, IP addresses may be personal data; if you are subject to the GDPR, transmitting them to a processor requires a legal basis and, as a rule, a data processing agreement with the operator. Please assess this for your own site before activating the plugin.
Requests are buffered locally and sent in batches. No data is transmitted until you have entered a valid API key under Settings > LogHero.
Terms and privacy
- Service: log-hero.com
- Privacy policy: https://log-hero.com/privacy-policy
Bug reports
Bug reports for Log Hero are appreciated on GitHub. Please note that GitHub is not a support forum, and issues that aren’t adequately qualified as bugs are closed.
Further Reading
For more information about logs or this plugin, visit the Log-Hero homepage.
Written by Joobi from the project's own listing. See the source page
[0.5.0]
Added
- Web Bot Auth support. Requests that are signed according to the Web Bot Auth draft (HTTP Message Signatures, RFC 9421), for example by ChatGPT’s agent, now forward their signature headers to Log Hero, so signed bots can be verified cryptographically instead of by user agent and IP address alone. The plugin itself does not verify anything and adds no work for unsigned requests.
Changed
- The client IP address is now also transmitted unhashed, so Log Hero can verify bots against the current IP ranges published by their operators and by reverse DNS. Earlier versions sent per-octet hashes, which are trivial to reverse and therefore were never an effective anonymization.
[0.4.0]
Security
- Fixed: on web servers that ignore .htaccess files (nginx, some LiteSpeed and Apache setups), the plugin’s logs folder was publicly readable. It contained settings.loghero.io.json with the LogHero API key and, if configured, the Redis URL, as well as the log buffer with request data of recent visitors. Please regenerate your LogHero API key after updating, and change your Redis password if you configured one.
- The settings file is gone. Settings are read from the WordPress database only.
- The REST route loghero/v1/flush is gone. Buffered log events are now sent at the end of the request after the response has been delivered (PHP-FPM, LiteSpeed), or by WP-Cron otherwise. A WP-Cron event every five minutes acts as a safety net.
- The log buffer and error files moved to a folder with a random, unguessable name in the uploads directory. Define LOGHERO_STORAGE_DIR in wp-config.php (or use the loghero_storage_dir filter) to keep them outside the web root.
- On update, the old logs folder and all files in it are deleted. Pending log events are moved to the new buffer first.
- Error files store only the error message, no stack traces.
[0.3.0]
Security
- Removed flush.php, a directly accessible PHP file in the plugin directory that ran without loading WordPress. Flushing is now a REST route, loghero/v1/flush, authenticated in its permission callback with a constant time token comparison.
- All settings values are sanitized when saved and escaped when displayed. The developer endpoint field is restricted to http and https URLs.
- Every plugin file now refuses to run when called directly.
Fixed
- The API endpoint on the developer settings page could never be saved. It was registered under its pre 0.2.3 name while the form posted the prefixed one, so WordPress discarded the value.
- Admin notices linked to /wp-admin/ instead of the real admin URL, which was wrong on installations in a subdirectory.
- Log events are delivered again. The API endpoint the plugin shipped with, api.loghero.io, no longer exists, so no data could reach Log Hero. The plugin now talks to the current endpoint.
Changed
- Declared compatibility with current WordPress and PHP versions. The plugin now requires WordPress 6.0 or newer and PHP 7.4 or newer.
- Documented the Log Hero service as an external service, including the exact data transmitted for each request and a link to the privacy policy.
- Removed an inaccurate claim from the plugin description: IP addresses are transmitted for all requests, not only for bots.
[0.2.5]
Added
- Support for IPv6
[0.2.4]
Added
- Limit batch size of buffered log events (split into multiple batches if number of buffered log events exceeds limit).
- Fix custom API settings (did not affect the WordPress plugin).
[0.2.3]
Added
- Redis log buffer as an alternative to the file log buffer
- Option to disable flush of log events
- Added prefix to plugin options to avoid name collisions
[0.2.2]
Added
- Admin error message if plugin cannot write to log buffer
- Send protocol version (http or https)
- Evaluation of IP ranges to improve bot detection
[0.2.1]
Added
- Workaround for sites using Cloudflare
- Admin warnings in case of unexpected errors
- Protection from running out of disk space in case of flush errors
- Option to switch from asynchronous mode to synchronous mode
Follow this listing's changes (Atom feed)