=== Trimardeau SEO Log ===
Contributors: nicolastrimardeau
Tags: seo, crawler, googlebot, ai, log
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.4.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Google crawls you. AIs read you. See everything: search engine and AI crawler analytics for every post, page and term.

== Description ==

Trimardeau SEO Log records every visit from search engine bots (Googlebot, Bingbot, DuckDuckBot…), AI training crawlers (GPTBot, ClaudeBot, CCBot, Bytespider…), live AI assistants (ChatGPT-User, Perplexity-User…), SEO tools and social preview bots — and turns them into clear, actionable statistics. Nothing to configure: activate it and watch the bots arrive.

**AI visibility (GEO).** Generative Engine Optimization starts with one question: do AI crawlers and assistants read your site? Trimardeau SEO Log answers it with dedicated stats for AI training crawlers and logs every live AI assistant visit — which assistant reads which page, in real time.

**Everything is measured where you work:**

* **Dashboard** — bot visits over time, trend vs the previous period, most crawled content, most active bots, HTTP status codes served to bots, hour-by-day crawl heatmap.
* **Contents** — a sortable, filterable overview of every post, page, term, archive or sitemap visited by bots, with the dominant bot for each.
* **Live Log** — the raw, chronological journal of every bot request (bot, URL, HTTP status).
* **404 Monitor** — every broken URL that bots keep hitting, grouped and ranked, so you can fix or redirect what actually matters to crawlers.
* **Per-content stats** — last crawl date, 30-day chart and per-bot counts on every post, page, custom post type and taxonomy term.

**Lightweight and privacy-friendly by design:**

* Human visitors are never logged — zero extra SQL query for them, no cookies, no consent banner needed.
* No external requests: everything (including charts) is bundled.
* Raw log retention is configurable (30 days by default, 0 = keep forever); daily aggregated statistics are kept forever and stay small.
* Fully translatable — French, Spanish, German, Italian and Brazilian Portuguese translations are maintained on translate.wordpress.org.
* Bundles [Chart.js](https://www.chartjs.org/) v4.5.1 (MIT) for the charts — no CDN, loaded only on the plugin's admin pages.

== Installation ==

1. Install and activate the plugin.
2. That's it — bot visits start being recorded immediately. Open the SEO Log menu.

== Frequently Asked Questions ==

= Does it slow my site down? =
No. Human visitors trigger zero extra SQL query. Bot hits are written after the response is sent, so bots don't wait either.

= Does it work behind a cache or CDN? =
Bot requests that reach WordPress are logged. Pages served entirely from a full-page cache or CDN edge never reach PHP and cannot be seen by any WordPress plugin. Note that most search and AI crawlers frequently bypass caches.

= Is it GDPR compliant? =
Human visitors are never logged. Only requests from identified bots are stored, and you can delete everything on uninstall.

= What is the difference between AI training crawlers and AI assistants? =
Training crawlers (GPTBot, ClaudeBot, CCBot…) collect content to train models. AI assistants (ChatGPT-User, Perplexity-User…) fetch your pages live while answering a user — meaning your content is being read and cited in real time. Both are fully logged, URLs included.

= How long is the data kept? =
Raw request logs: 30 days by default, configurable in the settings (0 = keep forever). Daily aggregated statistics: forever — they are tiny.

== Screenshots ==

1. Dashboard: bot visits over time, trends, bot families and crawl heatmap.
2. Contents: every content visited by bots, sortable and filterable.
3. Live Log: the raw chronological journal of bot requests.
4. 404 Monitor: broken URLs that bots keep hitting.
5. Post editor metabox: 30-day chart and per-bot stats.
6. Settings: retention, proxy support and database usage.

== Changelog ==

= 1.4.1 =
* All plugin functions, classes, constants, options, hooks and database tables now use the longer `trimseolog` prefix (was `trm_seolog`).
* All SQL identifiers now go through `$wpdb->prepare()` with the `%i` placeholder; minimum required WordPress version raised to 6.2 accordingly.

= 1.4.0 =
* Plugin renamed to "Trimardeau SEO Log".
* AI assistant visits (ChatGPT-User, Perplexity-User, Claude-User…) are now fully logged, URLs included, like every other bot family — with a dedicated dashboard card.
* New setting: raw log retention in days (0 = keep forever).
* Hardened sanitization of request data (user agent, URL, HTTP method) before logging.
* Updated bundled Chart.js to 4.5.1.
* Translations are now delivered through translate.wordpress.org instead of bundled files.

= 1.3.1 =
* Performance: the nightly aggregation now only processes days since the last rollup instead of re-scanning the whole raw log.
* Completed German, Italian and Brazilian Portuguese translations for the 1.3.0 strings.

= 1.3.0 =
* Latest AI assistant detections shown on the dashboard and in the Live Log.
* New notice when raw logs approach the 30-day purge.

= 1.2.0 =
* New: Live Log screen — chronological journal of raw bot requests.
* New: 404 Monitor screen — broken URLs hit by bots, grouped and ranked.
* New: trends on dashboard cards (vs previous period).
* New: onboarding notice and helpful empty state before the first bot visit.
* New: German, Italian and Brazilian Portuguese translations.

= 1.1.0 =
* New: Contents screen — sortable, filterable overview of every page, post and term visited by bots.
* New: 30-day bot hits chart in the post editor metabox.

= 1.0.0 =
* Initial release.
