BotTally

Description

Find out what AI takes from your site, and what it gives back.

BotTally shows two things side by side:

  1. Which AI bots read your content. GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User, Applebot, Meta-ExternalAgent, Bytespider, Amazonbot, CCBot and more are recognised on the server by their User-Agent.
  2. How many people arrive from AI answers. Visitors who click a link to your site in ChatGPT, Perplexity, Claude, Gemini, Microsoft Copilot, Meta AI, Le Chat, DeepSeek or Grok are counted by a tiny script (under 1 KB, no cookies).

The main report puts both numbers in one table per AI company, with a ratio: people per 1,000 bot visits. This tells you which companies send readers back for what their bots take, and helps you decide whom to block.

Features

  • Overview for the period you choose (7 days up to all the history you keep): AI bot visits, people from AI answers, number of blocked bots, a daily SVG chart (no external libraries).
  • Table by company: bots and their purpose (AI training, AI search, user request), bot visits, human visits, ratio, and an allow/block switch for every bot.
  • The pages AI bots read most and the landing pages of people from AI answers: top 20, 100 or 500, for any period up to all the history you keep.
  • Access control through robots.txt: one-click rule sets “Block training, allow search” (recommended), “Block all”, “Allow all”, or per-bot switches. A preview shows the resulting robots.txt.
  • Safety check: before you block a search or user-request bot, the plugin shows how many people came from that company’s AI answers in the last 30 days.
  • Works with SEO plugins: rules are appended through the core robots_txt filter, rules of Yoast SEO, Rank Math, WooCommerce and others are kept.
  • Detects a physical robots.txt file (which WordPress cannot change), never overwrites it and gives you the lines to copy.
  • Detects page caches (LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, SiteGround Optimizer, Cloudflare) and explains what that means for bot counts. For WP Rocket and LiteSpeed Cache a button excludes AI bots from the cache (only when you click it).
  • Dashboard widget with the numbers for the last 7 days.
  • Quick setup in three steps (what to count, who may read your site, page cache); it can be opened again from the header at any time.
  • History as long as you like: keep daily totals from 7 days to 2 years, or forever. One small row per bot, page and day.
  • Settings and diagnostics: history length, paths that are not counted, roll-up status, physical robots.txt, cache status.
  • Multisite: every site of the network has its own tables and settings.

Built to be light

  • Normal visitors: one regular-expression check of the User-Agent, no database query.
  • AI bots: one INSERT at the end of the request, after the response code is known.
  • Raw events are rolled up into daily counters every hour (Action Scheduler when WooCommerce is active, WP-Cron otherwise), in batches of 5,000 rows, and deleted after 48 hours.
  • Above 100,000 bot visits per day the plugin automatically switches to sampling (every Nth visit is recorded and multiplied) and marks the report as estimated.

Privacy

Everything is counted locally on your site. The plugin sends nothing to Vicsor or anyone else.

  • No cookies, no localStorage/sessionStorage, no visitor identifiers.
  • IP addresses and full User-Agent strings are never stored. The beacon’s rate limit (60 requests per minute per client) uses a salted hash of the IP address in a counter that expires after about a minute.
  • Only the name of the bot or AI source, the page path (without query string), the time, the HTTP status and daily totals are stored.

Do you need a consent banner for the visitor count? The plugin does not use cookies or identifiers, but under EU ePrivacy rules a script that reads information in the browser (here: the referring site and the address) and sends it can fall under Article 5(3) of the ePrivacy Directive (see EDPB Guidelines 2/2023). Several regulators exempt strictly anonymous, first-party audience measurement from consent, others do not. We therefore do not promise that no consent is needed in every country; please check with your privacy adviser. You can turn the visitor count off in Tools AI Bots Settings. A suggested privacy policy text is added to Settings Privacy Policy Guide.

Honest numbers

Bots do not run JavaScript, so their visits can only be counted on the server. If a page cache serves a page without starting WordPress, that visit is not counted. The plugin tells you when this can happen and how to fix it, and the report says “part of the bot visits is not visible because of the page cache” instead of pretending to be exact. Google-Extended and Applebot-Extended are robots.txt tokens only: Google and Apple crawl with their normal search bots, so these visits cannot be told apart.

Pro add-on

BotTally is complete on its own: no locked features, no limits, no license checks and no requests to our servers. A separate paid plugin, BotTally Pro, adds features of its own through hooks: answering chosen bots with 403, 429 or 402 before the theme loads, server and Cloudflare rules, IP verification against the ranges the AI companies publish, a list of unknown bots, rules per site section, filters by bot and AI source with custom date ranges, WooCommerce orders by AI source, e-mail reports, alerts, llms.txt, CSV and Google Analytics 4 export. A “Go Pro” link and a short list of these features appear only on the plugin’s own page; both disappear when the add-on is active.

For developers

Filters: aibi_agents (bot directory), aibi_agents_signature (lets the User-Agent index stay cached when aibi_agents is filtered), aibi_admin_header_pills (status pills in the header), aibi_robots_rules (lines, blocked keys, robots.txt so far), aibi_retention_days, aibi_retention_choices, aibi_top_pages_limit, aibi_admin_tabs, aibi_verify_hit, aibi_rate_limit, aibi_is_site_content, aibi_sampling_threshold, aibi_rollup_settle_seconds, aibi_pro_active.
Actions: aibi_loaded, aibi_agent_request (every request of a known AI bot, before the theme), aibi_bot_detected, aibi_referral_recorded, aibi_rollup_completed, aibi_admin_after_overview, aibi_admin_settings_after, aibi_admin_access_after, aibi_admin_notices, aibi_render_tab_{$tab}, aibi_unknown_bot_request (a bot-like User-Agent that is not in the directory; only its name token is passed, and only when an add-on listens). Add-on screens can use the components of AIBotInsights\Admin\UI (cards, toggles, save bar, toasts). An add-on fires aibi_pro_loaded to hide the “Go Pro” links.

External services

This plugin does not connect to any external service. The bot directory is bundled with the plugin (data/agents.json) and is updated with plugin releases; it is never downloaded from a server. The visitor beacon sends data only to your own site (/wp-json/aibi/v1/ref). The admin screens contain plain links to the crawler documentation of OpenAI, Anthropic, Perplexity, Google, Apple, Meta, Amazon and Common Crawl; they are only opened if you click them.

Installation

  1. Upload the bottally folder to /wp-content/plugins/ or install it from Plugins Add New.
  2. Activate the plugin (network-activate on Multisite to set it up on every site).
  3. Open Tools AI Bots. The first AI bot visits usually show up within a day.
  4. Optional: follow the quick setup on the Overview, or pick a rule set on the Access tab. Nothing in robots.txt changes until you do.

FAQ

I used AI Bot Insights before. What do I do?

BotTally is the new name of AI Bot Insights. Install and activate BotTally, then deactivate and delete AI Bot Insights. BotTally keeps all settings, rules and statistics: it uses the same data, and it prevents the old plugin from deleting that data when you remove it.

Does the plugin block anything by default?

No. Until you choose a rule set or switch off a bot, robots.txt stays exactly as it was. “Block training, allow search” is recommended because it keeps you visible in AI search answers.

Does robots.txt really stop AI bots?

robots.txt is a request, not a wall. The major companies document that their crawlers follow it. Bots that act on a user’s request (ChatGPT-User, Perplexity-User, Claude-User, Amzn-User, Meta-ExternalFetcher) may not apply it, according to their own documentation. The report shows bots that keep visiting after you blocked them.

I have a robots.txt file in my site root.

Your web server serves that file directly and WordPress never sees the request, so no plugin can add rules to it. BotTally detects the file, does not touch it, and shows you the exact lines to copy into it.

Why do I see fewer bot visits than in my server logs?

Most likely a page cache serves pages without starting WordPress. See Tools AI Bots Settings Page cache. Requests to excluded paths (by default /wp-json/ and /wp-admin/) are not counted either.

Are people from AI answers counted when my pages are cached?

Yes. That count happens in the browser through a REST request, so it works with any page cache.

Can anyone fake visits?

The endpoint only accepts known AI sources and paths of real content on your site, and at most 60 requests per minute from one client. Someone could still send fake User-Agents to inflate bot numbers; IP verification against the published ranges is planned for Pro.

What happens on deactivation and uninstall?

Deactivation stops the hourly task, removes the robots.txt rules (they are generated on the fly) and undoes the cache exclusion. Deleting the plugin removes its tables, options and temporary data on every site.

Reviews

There are no reviews for this plugin.

Contributors and Developers

“BotTally” is open source software. The following people have contributed to this plugin.

Contributors

Translate “BotTally” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Change Log

0.5.3

  • No WordPress location is hard-coded any more: the robots.txt preview, the default excluded paths and the referral filter take the admin, AJAX, REST, login, content and includes locations from admin_url() and the other WordPress URL functions, so sites in a sub-folder or with a moved wp-admin work correctly.

0.5.2

  • History has no upper limit any more: keep daily totals from 7 days to 2 years, or forever. The aibi_retention_max_days filter was removed.
  • Overview and Pages show 7 days, 30/90/180 days, 1 year, 2 years or all history (as far back as you keep it); long periods are charted per week or month. The page tables show the top 20, 100 or 500 pages.
  • The hourly roll-up now takes an atomic database lock, so two runs at the same time can no longer count visits twice. A lock older than 120 seconds is taken over.
  • The “Go Pro” link was removed from the Plugins screen; the list of add-on features on the Settings tab was updated.

0.5.1

  • Moving from AI Bot Insights is now safe: deleting the old plugin no longer removes the settings, rules and statistics that BotTally uses, and the page-cache exclusion is switched back on after the old plugin is deactivated.
  • BotTally also stays idle (instead of loading twice) when it is network-activated and the old plugin is active on a single site.

0.5.0

  • AI Bot Insights is now called BotTally: new plugin folder bottally and text domain bottally. Settings, data, hooks and the admin page address are unchanged, so BotTally picks up everything the old plugin collected.
  • If the old “AI Bot Insights” plugin is still active, BotTally stays idle and shows a notice asking to remove the old copy.
  • The robots.txt block is now marked # BEGIN BotTally.

0.4.0

  • New hooks for add-ons (backward compatible): aibi_unknown_bot_request (bots that are not in the directory; passes only the bot name, runs only when an add-on listens), aibi_agents_signature (keeps the User-Agent index cached when an add-on extends the directory), aibi_admin_access_after, aibi_admin_notices.
  • Admin helpers for add-on screens: “Show” button for secret fields, “Copy” buttons, coloured selects.
  • No change in counting, robots.txt rules or stored settings.

0.3.0

  • New look for Tools AI Bots in the Vicsor design: header with status, tabs as pills, one card per topic, toggles instead of checkboxes, rule sets as cards, a sticky “Save changes” bar with an “Unsaved changes” hint, and inline messages after saving.
  • Quick setup in three steps (what to count, who may read your site, page cache), shown once on the Overview and available from the header.
  • Clearer texts: every setting says what it does; rarely used options (excluded paths, sampling) moved under “Advanced”; empty states explain what happens next; inline check of the excluded paths.
  • “Settings & diagnostics” is now “Settings”; the Pro features are shown as a plain list instead of disabled checkboxes.
  • New hooks for add-ons: filter aibi_admin_header_pills, action aibi_admin_settings_after, UI components in AIBotInsights\Admin\UI.
  • No change in counting, robots.txt rules or stored settings.

0.2.0

  • New action aibi_agent_request: fires for every request of a known AI bot before the theme loads, also when bot counting is off or the path is excluded (used by the Pro add-on for hard blocking).
  • The aibi_robots_rules filter also receives the robots.txt built so far by WordPress and other plugins.
  • New filters aibi_retention_choices and aibi_pro_active.

0.1.0

  • First release: server-side AI bot counting, beacon for people from AI answers, hourly roll-up with 30-day history, robots.txt rule sets with safety check, physical robots.txt and page cache detection, admin report, dashboard widget, Multisite support.