=== Agurel AI Agent Monitor ===
Contributors: ahmtgurel
Tags: ai, bots, analytics, monitoring, chatgpt
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See which AI agents (ChatGPT, Claude, Perplexity, and more) visit your WordPress site, and which pages they look at.

== Description ==

AI assistants and search engines increasingly rely on autonomous crawlers and agents — ChatGPT, Claude, Perplexity, Google's Gemini-related agents, and others — to read and reference websites. Agurel AI Agent Monitor gives you visibility into this traffic directly inside your WordPress dashboard.

This is a **monitoring-only** plugin. It does not block, allow, or otherwise control access for any bot — it simply shows you what is already happening on your site.

**What it shows you**

* Total AI agent visits over a selected period (7 / 30 / 90 days)
* Which specific agents are visiting (ChatGPT-User, ClaudeBot, PerplexityBot, GPTBot, and more)
* A breakdown by purpose: Live Response (on-demand fetches), Search / Indexing, and Training crawlers
* Your most-visited pages (top 30) for the selected period
* An automatic alert if AI agent traffic drops sharply compared to the previous period — a useful early signal that something (a robots.txt change, a security plugin, a firewall rule) may be blocking agents from reaching your site

**Built to stay out of your way**

* No configuration needed — install and it starts recording
* No external services, tracking scripts, or third-party requests — everything stays on your own server and database
* Dynamic/query-string URLs (search results, filtered listings, tracking parameters) are never logged, only clean content pages
* Raw visit data is automatically kept for a maximum of 6 months; the dashboard itself looks back at most 3 months

**A note on caching**

For accurate logging, this plugin needs its PHP code to actually run when an AI agent visits — page caching can sometimes short-circuit that. On activation, the plugin adds a small, safe block to your `.htaccess` file so that known AI agent requests bypass LiteSpeed's server-level cache, and it marks agent requests with the standard `DONOTCACHEPAGE` constant recognized by most popular cache plugins (WP Rocket, W3 Total Cache, etc.). Edge/CDN-level caching (for example, Cloudflare's "Cache Everything" setting) sits in front of your server entirely and cannot be addressed from within WordPress — if you use this, some agent visits may not be recorded.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/agurel-ai-agent-monitor`, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **AI Agent Monitor** in your admin menu to view the dashboard.

== Frequently Asked Questions ==

= Does this plugin block any bots? =

No. This is a monitoring tool only. It does not control access for any bot or agent in any way.

= Why don't I see any data yet? =

The plugin only starts recording from the moment it's activated — it has no visibility into past traffic. Give it a few days for agents to visit your site naturally.

= Why isn't a specific bot tracked? =

The plugin recognizes a fixed, curated list of known AI agents. This list is not user-editable in this version.

= Does this affect my site's performance for regular visitors? =

No. The plugin only adds a lightweight check for known AI agent User-Agents; regular visitor requests and caching are unaffected.

= Is any data sent to a third party? =

No. All data is stored in your own WordPress database and never leaves your server.

== Changelog ==

= 1.0.2 =
* Moved admin dashboard CSS to a properly enqueued stylesheet (was previously inline), per WordPress.org plugin review guidelines.

= 1.0.1 =
* Most Visited Pages now shows which specific agents visited each page.

= 1.0.0 =
* Initial release.
